summaryrefslogtreecommitdiffstats
path: root/src/basket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/basket.cpp')
-rw-r--r--src/basket.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/basket.cpp b/src/basket.cpp
index 6d007a4..6532335 100644
--- a/src/basket.cpp
+++ b/src/basket.cpp
@@ -54,12 +54,12 @@
#include <krun.h>
#include <tqtoolbar.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <kmessagebox.h>
#include <tqinputdialog.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <stdlib.h> // rand() function
#include <tqdatetime.h> // seed for rand()
@@ -987,7 +987,7 @@ void Basket::setDisposition(int disposition, int columnCount)
}
} else if (currentDisposition == COLUMNS_LAYOUT && (disposition == FREE_LAYOUT || disposition == MINDMAPS_LAYOUT)) {
Note *column = firstNote();
- m_columnsCount = 0; // Now, so relayoutNotes() will not relayout the free notes as if they were columns!
+ m_columnsCount = 0; // Now, so relayoutNotes() will not retqlayout the free notes as if they were columns!
while (column) {
// Move all childs on the first level:
Note *nextColumn = column->next();
@@ -1107,7 +1107,7 @@ bool Basket::save()
return false;
}
- Global::bnpView->setUnsavedStatus(false);
+ Global::bnpView->setUnsavedtqStatus(false);
return true;
}
@@ -1854,7 +1854,7 @@ void Basket::clickedToInsert(TQMouseEvent *event, Note *clicked, /*Note::Zone*/i
{
Note *note;
if (event->button() == Qt::MidButton)
- note = NoteFactory::dropNote(KApplication::clipboard()->data(TQClipboard::Selection), this);
+ note = NoteFactory::dropNote(KApplication::tqclipboard()->data(TQClipboard::Selection), this);
else
note = NoteFactory::createNoteText("", this);
@@ -2075,7 +2075,7 @@ void Basket::pasteNote(TQClipboard::Mode mode)
}
closeEditor();
unselectAll();
- Note *note = NoteFactory::dropNote(KApplication::clipboard()->data(mode), this);
+ Note *note = NoteFactory::dropNote(KApplication::tqclipboard()->data(mode), this);
if (note) {
insertCreatedNote(note);
//unselectAllBut(note);
@@ -2533,7 +2533,7 @@ void Basket::doAutoScrollSelection()
dx = pos.x() - visibleWidth() + AUTO_SCROLL_MARGIN;
if (dx || dy) {
- kapp->sendPostedEvents(); // Do the repaints, because the scrolling will make the area to repaint to be wrong
+ kapp->sendPostedEvents(); // Do the repaints, because the scrolling will make the area to tqrepaint to be wrong
scrollBy(dx, dy);
if (!m_autoScrollSelectionTimer.isActive())
m_autoScrollSelectionTimer.start(AUTO_SCROLL_DELAY);
@@ -2707,7 +2707,7 @@ void Basket::mouseEnteredEditorWidget()
void Basket::removeInserter()
{
- if (m_inserterShown) { // Do not hide (and then update/repaint the view) if it is already hidden!
+ if (m_inserterShown) { // Do not hide (and then update/tqrepaint the view) if it is already hidden!
m_inserterShown = false;
updateContents(m_inserterRect);
}
@@ -2764,7 +2764,7 @@ void Basket::drawInserter(TQPainter &painter, int xPainter, int yPainter)
int lineY = (m_inserterGroup && m_inserterTop ? 0 : 2);
int roundY = (m_inserterGroup && m_inserterTop ? 0 : 1);
- TQColor dark = KApplication::palette().active().dark();
+ TQColor dark = KApplication::tqpalette().active().dark();
TQColor light = dark.light().light();
if (m_inserterGroup && Settings::groupOnInsertionLine())
light = Tools::mixColor(light, KGlobalSettings::highlightColor());
@@ -2836,9 +2836,9 @@ void Basket::maybeTip(const TQPoint &pos)
if (tagsString.isEmpty())
tagsString = tagName;
else
- tagsString = i18n("%1, %2").arg(tagsString, tagName);
+ tagsString = i18n("%1, %2").tqarg(tagsString, tagName);
}
- message = message.arg(tagsString);
+ message = message.tqarg(tagsString);
}
break;
case Note::Custom0: message = note->content()->zoneTip(zone); break; //"Open this link/Open this file/Open this sound file/Launch this application"
@@ -2875,7 +2875,7 @@ void Basket::maybeTip(const TQPoint &pos)
TQStringList::iterator key;
TQStringList::iterator value;
for (key = keys.begin(), value = values.begin(); key != keys.end() && value != values.end(); ++key, ++value)
- message += "<br>" + i18n("of the form 'key: value'", "<b>%1</b>: %2").arg(*key, *value);
+ message += "<br>" + i18n("of the form 'key: value'", "<b>%1</b>: %2").tqarg(*key, *value);
message += "</nobr></qt>";
} else if (m_inserterSplit && (zone == Note::TopInsert || zone == Note::BottomInsert))
message += "\n" + i18n("Click on the right to group instead of insert");
@@ -3070,12 +3070,12 @@ void Basket::drawContents(TQPainter *painter, int clipX, int clipY, int clipWidt
m_decryptBox->setFrameShadow( TQFrame::Plain );
m_decryptBox->setLineWidth( 1 );
- TQGridLayout* layout = new TQGridLayout( m_decryptBox, 1, 1, 11, 6, "decryptBoxLayout");
+ TQGridLayout* tqlayout = new TQGridLayout( m_decryptBox, 1, 1, 11, 6, "decryptBoxLayout");
#ifdef HAVE_LIBGPGME
m_button = new TQPushButton( m_decryptBox, "button" );
m_button->setText( i18n( "&Unlock" ) );
- layout->addWidget( m_button, 1, 2 );
+ tqlayout->addWidget( m_button, 1, 2 );
connect( m_button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( unlock() ) );
#endif
TQLabel* label = new TQLabel( m_decryptBox, "label" );
@@ -3083,26 +3083,26 @@ void Basket::drawContents(TQPainter *painter, int clipX, int clipY, int clipWidt
#ifdef HAVE_LIBGPGME
label->setText( text + i18n("Press Unlock to access it.") );
#else
- label->setText( text + i18n("Encryption is not supported by<br/>this version of %1.").arg(kapp->aboutData()->programName()) );
+ label->setText( text + i18n("Encryption is not supported by<br/>this version of %1.").tqarg(kapp->aboutData()->programName()) );
#endif
- label->setAlignment( int( TQLabel::AlignTop ) );
- layout->addMultiCellWidget( label, 0, 0, 1, 2 );
+ label->tqsetAlignment( int( TQLabel::AlignTop ) );
+ tqlayout->addMultiCellWidget( label, 0, 0, 1, 2 );
TQLabel* pixmap = new TQLabel( m_decryptBox, "pixmap" );
pixmap->setPixmap( KGlobal::iconLoader()->loadIcon("encrypted", KIcon::NoGroup, KIcon::SizeHuge) );
- layout->addMultiCellWidget( pixmap, 0, 1, 0, 0 );
+ tqlayout->addMultiCellWidget( pixmap, 0, 1, 0, 0 );
TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
- layout->addItem( spacer, 1, 1 );
+ tqlayout->addItem( spacer, 1, 1 );
label = new TQLabel("<small>" +
i18n("To make baskets stay unlocked, change the automatic<br>"
"locking duration in the application settings.") + "</small>",
m_decryptBox);
- //label->setFixedWidth(label->sizeHint().width() / 2);
- label->setAlignment( int( TQLabel::AlignTop ) );
- layout->addMultiCellWidget( label, 2,2,0,2 );
+ //label->setFixedWidth(label->tqsizeHint().width() / 2);
+ label->tqsetAlignment( int( TQLabel::AlignTop ) );
+ tqlayout->addMultiCellWidget( label, 2,2,0,2 );
- m_decryptBox->resize(layout->sizeHint());
+ m_decryptBox->resize(tqlayout->tqsizeHint());
}
if(m_decryptBox->isHidden())
{
@@ -3132,12 +3132,12 @@ void Basket::drawContents(TQPainter *painter, int clipX, int clipY, int clipWidt
if (!m_loaded) {
TQPixmap pixmap(visibleWidth(), visibleHeight()); // TODO: Clip it to asked size only!
TQPainter painter2(&pixmap);
- TQSimpleRichText rt(TQString("<center>%1</center>").arg(i18n("Loading...")), TQScrollView::font());
+ TQSimpleRichText rt(TQString("<center>%1</center>").tqarg(i18n("Loading...")), TQScrollView::font());
rt.setWidth(visibleWidth());
int hrt = rt.height();
painter2.fillRect(0, 0, visibleWidth(), visibleHeight(), brush);
blendBackground(painter2, TQRect(0, 0, visibleWidth(), visibleHeight()), -1, -1, /*opaque=*/true);
- TQColorGroup cg = colorGroup();
+ TQColorGroup cg = tqcolorGroup();
cg.setColor(TQColorGroup::Text, textColor());
rt.draw(&painter2, 0, (visibleHeight() - hrt) / 2, TQRect(), cg);
painter2.end();
@@ -3392,7 +3392,7 @@ void Basket::popupEmblemMenu(Note *note, int emblemNumber)
TQKeySequence sequence;
if (currentState == nextState && !tag->shortcut().isNull())
sequence = tag->shortcut().operator TQKeySequence();
- menu.insertItem(StateMenuItem::radioButtonIconSet(state == currentState, menu.colorGroup()), new StateMenuItem(currentState, sequence, false), i );
+ menu.insertItem(StateMenuItem::radioButtonIconSet(state == currentState, menu.tqcolorGroup()), new StateMenuItem(currentState, sequence, false), i );
if (currentState == nextState && !tag->shortcut().isNull())
menu.setAccel(sequence, i);
++i;
@@ -3420,7 +3420,7 @@ void Basket::toggledStateInMenu(int id)
if (id == 1) {
removeTagFromSelectedNotes(m_tagPopup);
//m_tagPopupNote->removeTag(m_tagPopup);
- //m_tagPopupNote->setWidth(0); // To force a new layout computation
+ //m_tagPopupNote->setWidth(0); // To force a new tqlayout computation
updateEditorAppearance();
filterAgain();
save();
@@ -3494,7 +3494,7 @@ void Basket::popupTagsMenu(Note *note)
// TQKeySequence sequence;
// if (!currentTag->shortcut().isNull())
// sequence = currentTag->shortcut().operator TQKeySequence();
-// menu.insertItem(StateMenuItem::checkBoxIconSet(note->hasTag(currentTag), menu.colorGroup()), new StateMenuItem(currentState, sequence, true), i );
+// menu.insertItem(StateMenuItem::checkBoxIconSet(note->hasTag(currentTag), menu.tqcolorGroup()), new StateMenuItem(currentState, sequence, true), i );
// if (!currentTag->shortcut().isNull())
// menu.setAccel(sequence, i);
// ++i;
@@ -3565,7 +3565,7 @@ void Basket::toggledTagInMenu(int id)
removeTagFromSelectedNotes(tag);
else
addTagToSelectedNotes(tag);
- m_tagPopupNote->setWidth(0); // To force a new layout computation
+ m_tagPopupNote->setWidth(0); // To force a new tqlayout computation
filterAgain();
save();
}
@@ -3730,7 +3730,7 @@ void Basket::contentChangedInEditor()
if (m_inactivityAutoSaveTimer.isActive())
m_inactivityAutoSaveTimer.stop();
m_inactivityAutoSaveTimer.start(3 * 1000, /*singleShot=*/true);
- Global::bnpView->setUnsavedStatus(true);
+ Global::bnpView->setUnsavedtqStatus(true);
// }
}
@@ -4196,7 +4196,7 @@ void Basket::noteDeleteWithoutConfirmation(bool deleteFilesToo)
void Basket::doCopy(CopyMode copyMode)
{
- TQClipboard *cb = KApplication::clipboard();
+ TQClipboard *cb = KApplication::tqclipboard();
TQClipboard::Mode mode = (copyMode == CopyToSelection ? TQClipboard::Selection : TQClipboard::Clipboard);
NoteSelection *selection = selectedNotes();
@@ -5001,13 +5001,13 @@ void Basket::keyPressEvent(TQKeyEvent *event)
if (event->state() & TQt::ShiftButton) { // Shift+arrowKeys selection
if (m_startOfShiftSelectionNote == 0L)
m_startOfShiftSelectionNote = toFocus;
- ensureNoteVisible(toFocus); // Important: this line should be before the other ones because else repaint would be done on the wrong part!
+ ensureNoteVisible(toFocus); // Important: this line should be before the other ones because else tqrepaint would be done on the wrong part!
selectRange(m_startOfShiftSelectionNote, toFocus);
setFocusedNote(toFocus);
event->accept();
return;
} else /*if (toFocus != m_focusedNote)*/ { // Move focus to ANOTHER note...
- ensureNoteVisible(toFocus); // Important: this line should be before the other ones because else repaint would be done on the wrong part!
+ ensureNoteVisible(toFocus); // Important: this line should be before the other ones because else tqrepaint would be done on the wrong part!
setFocusedNote(toFocus);
m_startOfShiftSelectionNote = toFocus;
if ( ! (event->state() & TQt::ControlButton) ) // ... select only current note if Control
@@ -5047,7 +5047,7 @@ void Basket::selectRange(Note *start, Note *end, bool unselectOthers /*= true*/)
return;
}
- // Free layout baskets should select range as if we were drawing a rectangle between start and end:
+ // Free tqlayout baskets should select range as if we were drawing a rectangle between start and end:
if (isFreeLayout()) {
TQRect startRect( start->finalX(), start->finalY(), start->width(), start->finalHeight() );
TQRect endRect( end->finalX(), end->finalY(), end->width(), end->finalHeight() );
@@ -5282,7 +5282,7 @@ bool Basket::loadFromFile(const TQString &fullPath, TQByteArray *array)
if(m_encryptionType == PrivateKeyEncryption)
m_gpg->setText(i18n("Please enter the password for the following private key:"), false);
else
- m_gpg->setText(i18n("Please enter the password for the basket <b>%1</b>:").arg(basketName()), false); // Used when decrypting
+ m_gpg->setText(i18n("Please enter the password for the basket <b>%1</b>:").tqarg(basketName()), false); // Used when decrypting
return m_gpg->decrypt(tmp, array);
}
#else
@@ -5327,7 +5327,7 @@ bool Basket::saveToFile(const TQString& fullPath, const TQByteArray& array, TQ_U
m_gpg->setText("", false);
}
else
- m_gpg->setText(i18n("Please assign a password to the basket <b>%1</b>:").arg(basketName()), true); // Used when defining a new password
+ m_gpg->setText(i18n("Please assign a password to the basket <b>%1</b>:").tqarg(basketName()), true); // Used when defining a new password
success = m_gpg->encrypt(array, length, &tmp, key);
length = tmp.size();
@@ -5394,9 +5394,9 @@ bool Basket::saveToFile(const TQString& fullPath, const TQByteArray& array, TQ_U
),
(openSuccess
? i18n("Please remove files on the disk <b>%1</b> to let the application safely save your changes.")
- .arg(KIO::findPathMountPoint(fullPath))
+ .tqarg(KIO::findPathMountPoint(fullPath))
: i18n("File permissions are bad for <b>%1</b>. Please check that you have write access to it and the parent folders.")
- .arg(fullPath)
+ .tqarg(fullPath)
),
TQT_TQWIDGET(kapp->activeWindow())
);
@@ -5439,15 +5439,15 @@ DiskErrorDialog::DiskErrorDialog(const TQString &titleMessage, const TQString &m
//enableButton(Close, false);
//enableButtonOK(false);
setModal(true);
- TQHBoxLayout *layout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint());
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint());
TQPixmap icon = kapp->iconLoader()->loadIcon("hdd_unmount", KIcon::NoGroup, 64, KIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true);
TQLabel *iconLabel = new TQLabel(plainPage());
iconLabel->setPixmap(icon);
- iconLabel->setFixedSize(iconLabel->sizeHint());
+ iconLabel->setFixedSize(iconLabel->tqsizeHint());
TQLabel *label = new TQLabel("<p><nobr><b><font size='+1'>" + titleMessage + "</font></b></nobr></p><p>" + message + "</p>", plainPage());
if (!icon.isNull())
- layout->addWidget(iconLabel);
- layout->addWidget(label);
+ tqlayout->addWidget(iconLabel);
+ tqlayout->addWidget(label);
}
DiskErrorDialog::~DiskErrorDialog()
@@ -5480,7 +5480,7 @@ void Basket::lock()
#if 0
-#include <layout.h>
+#include <tqlayout.h>
#include <tqvbox.h>
#include <tqstring.h>
#include <tqpixmap.h>
@@ -5488,7 +5488,7 @@ void Basket::lock()
#include <kpopupmenu.h>
#include <kurllabel.h>
#include <tqcheckbox.h>
-#include <palette.h>
+#include <tqpalette.h>
#include <tqcursor.h>
#include <tqaction.h>
#include <kstdaccel.h>
@@ -5521,7 +5521,7 @@ void Basket::lock()
#include <klineedit.h>
#include <config.h>
-#include <textcodec.h>
+#include <tqtextcodec.h>
#include "basket.h"
#include "note.h"