diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:29:20 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:29:20 -0600 |
commit | 882bcd26b3d60be72ea2b35921969a9850c52db9 (patch) | |
tree | 8d0a6902c5de4632c4e73e35c4d86404fa75f470 /src | |
parent | c82058b2b64334c10d7e547cb81ac64efe09f516 (diff) | |
download | basket-882bcd26b3d60be72ea2b35921969a9850c52db9.tar.gz basket-882bcd26b3d60be72ea2b35921969a9850c52db9.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src')
57 files changed, 635 insertions, 635 deletions
diff --git a/src/archive.cpp b/src/archive.cpp index 6345a00..6f57f87 100644 --- a/src/archive.cpp +++ b/src/archive.cpp @@ -313,7 +313,7 @@ void Archive::open(const TQString &path) "It can be opened but not every information will be available to you. " "For instance, some notes may be missing because they are of a type only available in new versions. " "When saving the file back, consider to save it to another file, to preserve the original one.") - .tqarg(kapp->aboutData()->programName()), + .arg(kapp->aboutData()->programName()), i18n("Basket Archive Error") ); } @@ -321,7 +321,7 @@ void Archive::open(const TQString &path) KMessageBox::error( 0, i18n("This file was created with a recent version of %1. Please upgrade to a newer version to be able to open that file.") - .tqarg(kapp->aboutData()->programName()), + .arg(kapp->aboutData()->programName()), i18n("Basket Archive Error") ); file.close(); diff --git a/src/backup.cpp b/src/backup.cpp index 86ae3c6..2076694 100644 --- a/src/backup.cpp +++ b/src/backup.cpp @@ -28,7 +28,7 @@ #include <tqhbox.h> #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqpushbutton.h> #include <klocale.h> @@ -65,7 +65,7 @@ BackupDialog::BackupDialog(TQWidget *parent, const char *name) savesFolder = savesFolder.left(savesFolder.length() - 1); // savesFolder ends with "/" TQGroupBox *folderGroup = new TQGroupBox(1, Qt::Horizontal, i18n("Save Folder"), page); - new TQLabel("<qt><nobr>" + i18n("Your baskets are currently stored in that folder:<br><b>%1</b>").tqarg(savesFolder), folderGroup); + new TQLabel("<qt><nobr>" + i18n("Your baskets are currently stored in that folder:<br><b>%1</b>").arg(savesFolder), folderGroup); TQWidget *folderWidget = new TQWidget(folderGroup); TQHBoxLayout *folderLayout = new TQHBoxLayout(folderWidget, 0, spacingHint()); TQPushButton *moveFolder = new TQPushButton(i18n("&Move to Another Folder..."), folderWidget); @@ -77,9 +77,9 @@ BackupDialog::BackupDialog(TQWidget *parent, const char *name) "In this case, mount the shared-folder to the local file system and ask %2 to use that mount point.<br>" "Warning: you should not run %3 at the same time on both computers, or you risk to loss data while the two applications are desynced.</li>" "</ul><p>Please remember that you should not change the content of that folder manually (eg. adding a file in a basket folder will not add that file to the basket).</p>") - .tqarg(kapp->aboutData()->programName()) - .tqarg(kapp->aboutData()->programName()) - .tqarg(kapp->aboutData()->programName()), + .arg(kapp->aboutData()->programName()) + .arg(kapp->aboutData()->programName()) + .arg(kapp->aboutData()->programName()), folderWidget); folderLayout->addWidget(moveFolder); folderLayout->addWidget(useFolder); @@ -103,7 +103,7 @@ BackupDialog::BackupDialog(TQWidget *parent, const char *name) populateLastBackup(); - (new TQWidget(page))->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + (new TQWidget(page))->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); } BackupDialog::~BackupDialog() @@ -114,7 +114,7 @@ void BackupDialog::populateLastBackup() { TQString lastBackupText = i18n("Last backup: never"); if (Settings::lastBackup().isValid()) - lastBackupText = i18n("Last backup: %1").tqarg(Settings::lastBackup().toString(Qt::LocalDate)); + lastBackupText = i18n("Last backup: %1").arg(Settings::lastBackup().toString(Qt::LocalDate)); m_lastBackup->setText(lastBackupText); } @@ -135,7 +135,7 @@ void BackupDialog::moveToAnotherFolder() if (content.count() > 2) { // "." and ".." int result = KMessageBox::questionYesNo( 0, - "<qt>" + i18n("The folder <b>%1</b> is not empty. Do you want to override it?").tqarg(folder), + "<qt>" + i18n("The folder <b>%1</b> is not empty. Do you want to override it?").arg(folder), i18n("Override Folder?"), KGuiItem(i18n("&Override"), "filesave") ); @@ -170,7 +170,7 @@ void BackupDialog::backup() config->setGroup("Backups"); TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString fileName = i18n("Backup filename (without extension), %1 is the date", "Baskets_%1") - .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); + .arg(TQDate::currentDate().toString(Qt::ISODate)); TQString url = folder + fileName; // Ask a file name & path to the user: @@ -187,7 +187,7 @@ void BackupDialog::backup() int result = KMessageBox::questionYesNoCancel( 0, "<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?") - .tqarg(KURL(destination).fileName()), + .arg(KURL(destination).fileName()), i18n("Override File?"), KGuiItem(i18n("&Override"), "filesave") ); @@ -216,7 +216,7 @@ void BackupDialog::backup() usleep(300); // Not too long because if the backup process is finished, we wait for nothing } - Settings::setLastBackup(TQDate::tqcurrentDate()); + Settings::setLastBackup(TQDate::currentDate()); Settings::saveConfig(); populateLastBackup(); } @@ -245,7 +245,7 @@ void BackupDialog::restore() TQFile file(readmePath); if (file.open(IO_WriteOnly)) { TQTextStream stream(&file); - stream << i18n("This is a safety copy of your baskets like they were before you started to restore the backup %1.").tqarg(KURL(path).fileName()) + "\n\n" + stream << i18n("This is a safety copy of your baskets like they were before you started to restore the backup %1.").arg(KURL(path).fileName()) + "\n\n" << i18n("If the restoration was a success and you restored what you wanted to restore, you can remove this folder.") + "\n\n" << i18n("If something went wrong during the restoration process, you can re-use this folder to store your baskets and nothing will be lost.") + "\n\n" << i18n("Choose \"Basket\" -> \"Backup & Restore...\" -> \"Use Another Existing Folder...\" and select that folder.") + "\n"; @@ -253,8 +253,8 @@ void BackupDialog::restore() } TQString message = - "<p><nobr>" + i18n("Restoring <b>%1</b>. Please wait...").tqarg(KURL(path).fileName()) + "</nobr></p><p>" + - i18n("If something goes wrong during the restoration process, read the file <b>%1</b>.").tqarg(readmePath); + "<p><nobr>" + i18n("Restoring <b>%1</b>. Please wait...").arg(KURL(path).fileName()) + "</nobr></p><p>" + + i18n("If something goes wrong during the restoration process, read the file <b>%1</b>.").arg(readmePath); KProgressDialog *dialog = new KProgressDialog(0, 0, i18n("Restore Baskets"), message, /*modal=*/true); dialog->setAllowCancel(false); @@ -332,7 +332,7 @@ void Backup::setFolderAndRestart(const TQString &folder, const TQString &message // This is important for users to trust the application in such a critical phase and understands what's happening: KMessageBox::information( 0, - "<qt>" + message.tqarg( + "<qt>" + message.arg( (folder.endsWith("/") ? folder.left(folder.length() - 1) : folder), kapp->aboutData()->programName()), i18n("Restart") @@ -353,7 +353,7 @@ TQString Backup::newSafetyFolder() return fullPath; for (int i = 2; ; ++i) { - fullPath = TQDir::homeDirPath() + "/" + i18n("Safety folder name before restoring a basket data archive", "Baskets Before Restoration (%1)").tqarg(i) + "/"; + fullPath = TQDir::homeDirPath() + "/" + i18n("Safety folder name before restoring a basket data archive", "Baskets Before Restoration (%1)").arg(i) + "/"; if (!dir.exists(fullPath)) return fullPath; } diff --git a/src/basket.cpp b/src/basket.cpp index 6532335..6d007a4 100644 --- a/src/basket.cpp +++ b/src/basket.cpp @@ -54,12 +54,12 @@ #include <krun.h> #include <tqtoolbar.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <kmessagebox.h> #include <tqinputdialog.h> -#include <tqlayout.h> +#include <layout.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 retqlayout the free notes as if they were columns! + m_columnsCount = 0; // Now, so relayoutNotes() will not relayout 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->setUnsavedtqStatus(false); + Global::bnpView->setUnsavedStatus(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::tqclipboard()->data(TQClipboard::Selection), this); + note = NoteFactory::dropNote(KApplication::clipboard()->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::tqclipboard()->data(mode), this); + Note *note = NoteFactory::dropNote(KApplication::clipboard()->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 tqrepaint to be wrong + kapp->sendPostedEvents(); // Do the repaints, because the scrolling will make the area to repaint 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/tqrepaint the view) if it is already hidden! + if (m_inserterShown) { // Do not hide (and then update/repaint 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::tqpalette().active().dark(); + TQColor dark = KApplication::palette().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").tqarg(tagsString, tagName); + tagsString = i18n("%1, %2").arg(tagsString, tagName); } - message = message.tqarg(tagsString); + message = message.arg(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").tqarg(*key, *value); + message += "<br>" + i18n("of the form 'key: value'", "<b>%1</b>: %2").arg(*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* tqlayout = new TQGridLayout( m_decryptBox, 1, 1, 11, 6, "decryptBoxLayout"); + TQGridLayout* layout = new TQGridLayout( m_decryptBox, 1, 1, 11, 6, "decryptBoxLayout"); #ifdef HAVE_LIBGPGME m_button = new TQPushButton( m_decryptBox, "button" ); m_button->setText( i18n( "&Unlock" ) ); - tqlayout->addWidget( m_button, 1, 2 ); + layout->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.").tqarg(kapp->aboutData()->programName()) ); + label->setText( text + i18n("Encryption is not supported by<br/>this version of %1.").arg(kapp->aboutData()->programName()) ); #endif - label->tqsetAlignment( int( TQLabel::AlignTop ) ); - tqlayout->addMultiCellWidget( label, 0, 0, 1, 2 ); + label->setAlignment( int( TQLabel::AlignTop ) ); + layout->addMultiCellWidget( label, 0, 0, 1, 2 ); TQLabel* pixmap = new TQLabel( m_decryptBox, "pixmap" ); pixmap->setPixmap( KGlobal::iconLoader()->loadIcon("encrypted", KIcon::NoGroup, KIcon::SizeHuge) ); - tqlayout->addMultiCellWidget( pixmap, 0, 1, 0, 0 ); + layout->addMultiCellWidget( pixmap, 0, 1, 0, 0 ); TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - tqlayout->addItem( spacer, 1, 1 ); + layout->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->tqsizeHint().width() / 2); - label->tqsetAlignment( int( TQLabel::AlignTop ) ); - tqlayout->addMultiCellWidget( label, 2,2,0,2 ); + //label->setFixedWidth(label->sizeHint().width() / 2); + label->setAlignment( int( TQLabel::AlignTop ) ); + layout->addMultiCellWidget( label, 2,2,0,2 ); - m_decryptBox->resize(tqlayout->tqsizeHint()); + m_decryptBox->resize(layout->sizeHint()); } 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>").tqarg(i18n("Loading...")), TQScrollView::font()); + TQSimpleRichText rt(TQString("<center>%1</center>").arg(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 = tqcolorGroup(); + TQColorGroup cg = colorGroup(); 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.tqcolorGroup()), new StateMenuItem(currentState, sequence, false), i ); + menu.insertItem(StateMenuItem::radioButtonIconSet(state == currentState, menu.colorGroup()), 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 tqlayout computation + //m_tagPopupNote->setWidth(0); // To force a new layout 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.tqcolorGroup()), new StateMenuItem(currentState, sequence, true), i ); +// menu.insertItem(StateMenuItem::checkBoxIconSet(note->hasTag(currentTag), menu.colorGroup()), 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 tqlayout computation + m_tagPopupNote->setWidth(0); // To force a new layout 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->setUnsavedtqStatus(true); + Global::bnpView->setUnsavedStatus(true); // } } @@ -4196,7 +4196,7 @@ void Basket::noteDeleteWithoutConfirmation(bool deleteFilesToo) void Basket::doCopy(CopyMode copyMode) { - TQClipboard *cb = KApplication::tqclipboard(); + TQClipboard *cb = KApplication::clipboard(); 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 tqrepaint would be done on the wrong part! + ensureNoteVisible(toFocus); // Important: this line should be before the other ones because else repaint 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 tqrepaint would be done on the wrong part! + ensureNoteVisible(toFocus); // Important: this line should be before the other ones because else repaint 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 tqlayout baskets should select range as if we were drawing a rectangle between start and end: + // Free layout 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>:").tqarg(basketName()), false); // Used when decrypting + m_gpg->setText(i18n("Please enter the password for the basket <b>%1</b>:").arg(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>:").tqarg(basketName()), true); // Used when defining a new password + m_gpg->setText(i18n("Please assign a password to the basket <b>%1</b>:").arg(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.") - .tqarg(KIO::findPathMountPoint(fullPath)) + .arg(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.") - .tqarg(fullPath) + .arg(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 *tqlayout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint()); + TQHBoxLayout *layout = 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->tqsizeHint()); + iconLabel->setFixedSize(iconLabel->sizeHint()); TQLabel *label = new TQLabel("<p><nobr><b><font size='+1'>" + titleMessage + "</font></b></nobr></p><p>" + message + "</p>", plainPage()); if (!icon.isNull()) - tqlayout->addWidget(iconLabel); - tqlayout->addWidget(label); + layout->addWidget(iconLabel); + layout->addWidget(label); } DiskErrorDialog::~DiskErrorDialog() @@ -5480,7 +5480,7 @@ void Basket::lock() #if 0 -#include <tqlayout.h> +#include <layout.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 <tqpalette.h> +#include <palette.h> #include <tqcursor.h> #include <tqaction.h> #include <kstdaccel.h> @@ -5521,7 +5521,7 @@ void Basket::lock() #include <klineedit.h> #include <config.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include "basket.h" #include "note.h" diff --git a/src/basket.h b/src/basket.h index ec7bc8a..047f439 100644 --- a/src/basket.h +++ b/src/basket.h @@ -27,7 +27,7 @@ #include <tqtimer.h> #include <tqimage.h> #include <tqdatetime.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <kshortcut.h> #include <kdirwatch.h> #include <kaction.h> @@ -690,7 +690,7 @@ public slots: #include <tqwidget.h> #include <tqscrollview.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqptrlist.h> #include <tqtimer.h> #include <kio/job.h> diff --git a/src/basketfactory.cpp b/src/basketfactory.cpp index ed01301..5c54fd3 100644 --- a/src/basketfactory.cpp +++ b/src/basketfactory.cpp @@ -76,12 +76,12 @@ TQString BasketFactory::unpackTemplate(const TQString &templateName) " <properties>\n" " <disposition mindMap=\"%1\" columnCount=\"%2\" free=\"%3\" />\n" " </properties>\n" - " <notes>\n" ).tqarg( (templateName == "mindmap" ? "true" : "false"), + " <notes>\n" ).arg( (templateName == "mindmap" ? "true" : "false"), TQString::number(nbColumns), (templateName == "free" || templateName == "mindmap" ? "true" : "false") ); if (nbColumns > 0) for (int i = 0; i < nbColumns; ++i) - stream << TQString(" <group width=\"%1\"></group>\n").tqarg(columnWidth); + stream << TQString(" <group width=\"%1\"></group>\n").arg(columnWidth); stream << " </notes>\n" "</basket>\n"; file.close(); diff --git a/src/basketlistview.cpp b/src/basketlistview.cpp index 434e1a9..a963f8f 100644 --- a/src/basketlistview.cpp +++ b/src/basketlistview.cpp @@ -109,8 +109,8 @@ TQString BasketListViewItem::escapedName(const TQString &string) TQString letter; // Find the letter TQString altKey = /*i18n(*/"Alt"/*)*/; //i18n("The [Alt] key, as shown in shortcuts like Alt+C...", "Alt"); TQString shiftKey = /*i18n(*/"Shift"/*)*/; //i18n("The [Shift] key, as shown in shortcuts like Alt+Shift+1...", "Shift"); - TQRegExp altLetterExp( TQString("^%1\\+(.)$").tqarg(altKey) ); - TQRegExp altShiftLetterExp( TQString("^%1\\+%2\\+(.)$").tqarg(altKey, shiftKey) ); + TQRegExp altLetterExp( TQString("^%1\\+(.)$").arg(altKey) ); + TQRegExp altShiftLetterExp( TQString("^%1\\+%2\\+(.)$").arg(altKey, shiftKey) ); if (altLetterExp.search(m_basket->shortcut().toStringInternal()) != -1) letter = altLetterExp.cap(1); if (letter.isEmpty() && altShiftLetterExp.search(m_basket->shortcut().toStringInternal()) != -1) @@ -140,7 +140,7 @@ void BasketListViewItem::setup() setPixmap(/*column=*/0, icon); - tqrepaint(); + repaint(); } BasketListViewItem* BasketListViewItem::lastChild() @@ -260,7 +260,7 @@ extern void drawGradient( TQPainter *p, const TQColor &colorTop, const TQColor & TQPixmap BasketListViewItem::circledTextPixmap(const TQString &text, int height, const TQFont &font, const TQColor &color) { TQString key = TQString("BLI-%1.%2.%3.%4") - .tqarg(text).tqarg(height).tqarg(font.toString()).tqarg(color.rgb()); + .arg(text).arg(height).arg(font.toString()).arg(color.rgb()); if (TQPixmap* cached=TQPixmapCache::find(key)) { return *cached; } @@ -335,12 +335,12 @@ TQPixmap BasketListViewItem::foundCountPixmap(bool isLoading, int countFound, bo TQString text; if (childsAreLoading) { if (countChildsFound > 0) - text = i18n("%1+%2+").tqarg(TQString::number(countFound), TQString::number(countChildsFound)); + text = i18n("%1+%2+").arg(TQString::number(countFound), TQString::number(countChildsFound)); else - text = i18n("%1+").tqarg(TQString::number(countFound)); + text = i18n("%1+").arg(TQString::number(countFound)); } else { if (countChildsFound > 0) - text = i18n("%1+%2").tqarg(TQString::number(countFound), TQString::number(countChildsFound)); + text = i18n("%1+%2").arg(TQString::number(countFound), TQString::number(countChildsFound)); else if (countFound > 0) text = TQString::number(countFound); else @@ -412,7 +412,7 @@ int BasketListViewItem::countHiddenChildsFound() return countChildsFound(); } -void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*tqcolorGroup*/, int /*column*/, int width, int /*align*/) +void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*colorGroup*/, int /*column*/, int width, int /*align*/) { // Workaround a TQt bug: // When the splitter is moved to hide the tree view and then the application is restarted, @@ -452,21 +452,21 @@ void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*tqc // Don't forget to update the key computation if parameters // affecting the rendering logic change TQString key = TQString("BLVI::pC-%1.%2.%3.%4.%5.%6.%7.%8.%9.%10.%11.%12.%13.%14.%15") - .tqarg(effectiveWidth) - .tqarg(drawRoundRect) - .tqarg(textColor.rgb()) - .tqarg(m_basket->backgroundColor().rgb()) - .tqarg(isCurrentBasket()) - .tqarg(shownBelow && shownBelow->isCurrentBasket()) - .tqarg(shownAbove && shownAbove->isCurrentBasket()) - .tqarg(showLoadingIcon) - .tqarg(showEncryptedIcon) - .tqarg(showCountPixmap) - .tqarg(m_basket->countFounds()) - .tqarg(countHiddenChildsFound()) - .tqarg(m_isUnderDrag) - .tqarg(m_basket->basketName()) - .tqarg(m_basket->icon()); + .arg(effectiveWidth) + .arg(drawRoundRect) + .arg(textColor.rgb()) + .arg(m_basket->backgroundColor().rgb()) + .arg(isCurrentBasket()) + .arg(shownBelow && shownBelow->isCurrentBasket()) + .arg(shownAbove && shownAbove->isCurrentBasket()) + .arg(showLoadingIcon) + .arg(showEncryptedIcon) + .arg(showCountPixmap) + .arg(m_basket->countFounds()) + .arg(countHiddenChildsFound()) + .arg(m_isUnderDrag) + .arg(m_basket->basketName()) + .arg(m_basket->icon()); if (TQPixmap* cached = TQPixmapCache::find(key)) { // TQt's documentation recommends copying the pointer // into a TQPixmap immediately @@ -623,7 +623,7 @@ public: TQListViewItem *item = m_basketView->itemAt(m_basketView->contentsToViewport(pos)); BasketListViewItem* bitem = dynamic_cast<BasketListViewItem*>(item); if (bitem && bitem->isAbbreviated()) { - tip(m_basketView->tqitemRect(bitem), bitem->basket()->basketName()); + tip(m_basketView->itemRect(bitem), bitem->basket()->basketName()); } } private: diff --git a/src/basketlistview.h b/src/basketlistview.h index d46e8b7..62a7a47 100644 --- a/src/basketlistview.h +++ b/src/basketlistview.h @@ -50,7 +50,7 @@ class BasketListViewItem : public TQListViewItem void ensureVisible(); bool isShown(); bool isCurrentBasket(); - void paintCell(TQPainter *painter, const TQColorGroup &tqcolorGroup, int column, int width, int align); + void paintCell(TQPainter *painter, const TQColorGroup &colorGroup, int column, int width, int align); TQString escapedName(const TQString &string); /// TQPixmap circledTextPixmap(const TQString &text, int height, const TQFont &font, const TQColor &color); diff --git a/src/basketproperties.cpp b/src/basketproperties.cpp index fa5a3a2..43e58d6 100644 --- a/src/basketproperties.cpp +++ b/src/basketproperties.cpp @@ -24,7 +24,7 @@ #include <tqvbuttongroup.h> #include <knuminput.h> #include <kkeybutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqbuttongroup.h> #include <tqradiobutton.h> @@ -56,7 +56,7 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent) m_icon->setIconType(KIcon::NoGroup, KIcon::Action); m_icon->setIconSize(16); m_icon->setIcon(m_basket->icon()); - int size = TQMAX(m_icon->tqsizeHint().width(), m_icon->tqsizeHint().height()); + int size = TQMAX(m_icon->sizeHint().width(), m_icon->sizeHint().height()); m_icon->setFixedSize(size, size); // Make it square! TQToolTip::add(m_icon, i18n("Icon")); m_name = new TQLineEdit(m_basket->basketName(), page); @@ -99,8 +99,8 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent) } } // m_backgroundImage->insertItem(i18n("Other..."), -1); - int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); - m_backgroundImage->setSizeLimit(50/*75 * 6 / m_backgroundImage->tqsizeHint().height()*/); + int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); + m_backgroundImage->setSizeLimit(50/*75 * 6 / m_backgroundImage->sizeHint().height()*/); m_backgroundImage->setMinimumHeight(75 + 2 * BUTTON_MARGIN); // Disposition: @@ -117,8 +117,8 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent) m_disposition->insert(radio); new TQRadioButton(i18n("&Free-form"), m_disposition); TQRadioButton *mindMap = new TQRadioButton(i18n("&Mind map"), m_disposition); // TODO: "Learn more..." - int height = TQMAX(mindMap->tqsizeHint().height(), m_columnCount->tqsizeHint().height()); // Make all radioButtons vertically equaly-spaced! - mindMap->setMinimumSize(mindMap->tqsizeHint().width(), height); // Because the m_columnCount can be heigher, and make radio1 and radio2 more spaced than radio2 and radio3. + int height = TQMAX(mindMap->sizeHint().height(), m_columnCount->sizeHint().height()); // Make all radioButtons vertically equaly-spaced! + mindMap->setMinimumSize(mindMap->sizeHint().width(), height); // Because the m_columnCount can be heigher, and make radio1 and radio2 more spaced than radio2 and radio3. m_disposition->setButton(m_basket->isFreeLayout() ? (m_basket->isMindMap() ? 2 : 1) : 0); topLayout->addWidget(m_disposition); diff --git a/src/basketstatusbar.cpp b/src/basketstatusbar.cpp index 42127cf..14edc82 100644 --- a/src/basketstatusbar.cpp +++ b/src/basketstatusbar.cpp @@ -34,12 +34,12 @@ #include <tqtooltip.h> BasketStatusBar::BasketStatusBar(KStatusBar *bar) - : m_bar(bar), m_extension(0), m_selectiontqStatus(0), m_locktqStatus(0), m_baskettqStatus(0), m_savedtqStatus(0) + : m_bar(bar), m_extension(0), m_selectionStatus(0), m_lockStatus(0), m_basketStatus(0), m_savedStatus(0) { } BasketStatusBar::BasketStatusBar(KParts::StatusBarExtension *extension) - : m_bar(0), m_extension(extension), m_selectiontqStatus(0), m_locktqStatus(0), m_baskettqStatus(0), m_savedtqStatus(0) + : m_bar(0), m_extension(extension), m_selectionStatus(0), m_lockStatus(0), m_basketStatus(0), m_savedStatus(0) { } @@ -72,32 +72,32 @@ void BasketStatusBar::setupStatusBar() //Tools::printChildren(parent); if(lst->count() == 0) { - m_baskettqStatus = new TQLabel(parent); - m_baskettqStatus->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored, 0, 0, false) ); - addWidget( m_baskettqStatus, 1, false ); // Fit all extra space and is hiddable + m_basketStatus = new TQLabel(parent); + m_basketStatus->setSizePolicy( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored, 0, 0, false) ); + addWidget( m_basketStatus, 1, false ); // Fit all extra space and is hiddable } else - m_baskettqStatus = static_cast<TQLabel*>(TQT_TQWIDGET(lst->at(0))); + m_basketStatus = static_cast<TQLabel*>(TQT_TQWIDGET(lst->at(0))); delete lst; - m_selectiontqStatus = new TQLabel(i18n("Loading..."), parent); - addWidget( m_selectiontqStatus, 0, true ); + m_selectionStatus = new TQLabel(i18n("Loading..."), parent); + addWidget( m_selectionStatus, 0, true ); - m_locktqStatus = new ClickableLabel(0/*this*/); - m_locktqStatus->setMinimumSize(18, 18); - m_locktqStatus->tqsetAlignment(TQt::AlignCenter); -// addWidget( m_locktqStatus, 0, true ); - connect( m_locktqStatus, TQT_SIGNAL(clicked()), Global::bnpView, TQT_SLOT(lockBasket()) ); + m_lockStatus = new ClickableLabel(0/*this*/); + m_lockStatus->setMinimumSize(18, 18); + m_lockStatus->setAlignment(TQt::AlignCenter); +// addWidget( m_lockStatus, 0, true ); + connect( m_lockStatus, TQT_SIGNAL(clicked()), Global::bnpView, TQT_SLOT(lockBasket()) ); m_savedStatusPixmap = SmallIcon("filesave"); - m_savedtqStatus = new TQLabel(parent); - m_savedtqStatus->setPixmap(m_savedStatusPixmap); - m_savedtqStatus->setFixedSize(m_savedtqStatus->tqsizeHint()); - m_savedtqStatus->clear(); - //m_savedtqStatus->setPixmap(m_savedStatusIconSet.pixmap(TQIconSet::Small, TQIconSet::Disabled)); - //m_savedtqStatus->setEnabled(false); - addWidget( m_savedtqStatus, 0, true ); - TQToolTip::add(m_savedtqStatus, "<p>" + i18n("Shows if there are changes that have not yet been saved.")); + m_savedStatus = new TQLabel(parent); + m_savedStatus->setPixmap(m_savedStatusPixmap); + m_savedStatus->setFixedSize(m_savedStatus->sizeHint()); + m_savedStatus->clear(); + //m_savedStatus->setPixmap(m_savedStatusIconSet.pixmap(TQIconSet::Small, TQIconSet::Disabled)); + //m_savedStatus->setEnabled(false); + addWidget( m_savedStatus, 0, true ); + TQToolTip::add(m_savedStatus, "<p>" + i18n("Shows if there are changes that have not yet been saved.")); } void BasketStatusBar::postStatusbarMessage(const TQString& text) @@ -108,8 +108,8 @@ void BasketStatusBar::postStatusbarMessage(const TQString& text) void BasketStatusBar::setStatusText(const TQString &txt) { - if(m_baskettqStatus && m_baskettqStatus->text() != txt) - m_baskettqStatus->setText(txt); + if(m_basketStatus && m_basketStatus->text() != txt) + m_basketStatus->setText(txt); } void BasketStatusBar::setStatusBarHint(const TQString &hint) @@ -137,40 +137,40 @@ void BasketStatusBar::updateStatusBarHint() setStatusText(message); } -void BasketStatusBar::setLocktqStatus(bool isLocked) +void BasketStatusBar::setLockStatus(bool isLocked) { - if(!m_locktqStatus) + if(!m_lockStatus) return; if (isLocked) { - m_locktqStatus->setPixmap(SmallIcon("encrypted.png")); - TQToolTip::add(m_locktqStatus, i18n( + m_lockStatus->setPixmap(SmallIcon("encrypted.png")); + TQToolTip::add(m_lockStatus, i18n( "<p>This basket is <b>locked</b>.<br>Click to unlock it.</p>").replace(" ", " ") ); -// TQToolTip::add(m_locktqStatus, i18n("This basket is locked.\nClick to unlock it.")); +// TQToolTip::add(m_lockStatus, i18n("This basket is locked.\nClick to unlock it.")); } else { - m_locktqStatus->clear(); - TQToolTip::add(m_locktqStatus, i18n( + m_lockStatus->clear(); + TQToolTip::add(m_lockStatus, i18n( "<p>This basket is <b>unlocked</b>.<br>Click to lock it.</p>").replace(" ", " ") ); -// TQToolTip::add(m_locktqStatus, i18n("This basket is unlocked.\nClick to lock it.")); +// TQToolTip::add(m_lockStatus, i18n("This basket is unlocked.\nClick to lock it.")); } } -void BasketStatusBar::setSelectiontqStatus(const TQString &s) +void BasketStatusBar::setSelectionStatus(const TQString &s) { - if (m_selectiontqStatus) - m_selectiontqStatus->setText(s); + if (m_selectionStatus) + m_selectionStatus->setText(s); } -void BasketStatusBar::setUnsavedtqStatus(bool isUnsaved) +void BasketStatusBar::setUnsavedStatus(bool isUnsaved) { - if (!m_savedtqStatus) + if (!m_savedStatus) return; if (isUnsaved) { - if (m_savedtqStatus->pixmap() == 0) - m_savedtqStatus->setPixmap(m_savedStatusPixmap); + if (m_savedStatus->pixmap() == 0) + m_savedStatus->setPixmap(m_savedStatusPixmap); } else - m_savedtqStatus->clear(); + m_savedStatus->clear(); } #include "basketstatusbar.moc" diff --git a/src/basketstatusbar.h b/src/basketstatusbar.h index cb165e4..15baf32 100644 --- a/src/basketstatusbar.h +++ b/src/basketstatusbar.h @@ -46,10 +46,10 @@ class BasketStatusBar : public TQObject void setStatusBarHint(const TQString &hint); /// << Set a specific message or update if hint is empty void updateStatusBarHint(); /// << Display the current state message (dragging, editing) or reset the startsbar message void postStatusbarMessage(const TQString &text); - void setSelectiontqStatus(const TQString &s); - void setLocktqStatus(bool isLocked); + void setSelectionStatus(const TQString &s); + void setLockStatus(bool isLocked); void setupStatusBar(); - void setUnsavedtqStatus(bool isUnsaved); + void setUnsavedStatus(bool isUnsaved); protected: KStatusBar *statusBar () const; @@ -59,10 +59,10 @@ class BasketStatusBar : public TQObject private: KStatusBar *m_bar; KParts::StatusBarExtension *m_extension; - TQLabel *m_selectiontqStatus; - ClickableLabel *m_locktqStatus; - TQLabel *m_baskettqStatus; - TQLabel *m_savedtqStatus; + TQLabel *m_selectionStatus; + ClickableLabel *m_lockStatus; + TQLabel *m_basketStatus; + TQLabel *m_savedStatus; TQPixmap m_savedStatusPixmap; }; diff --git a/src/bnpview.cpp b/src/bnpview.cpp index 1d7488c..c20369d 100644 --- a/src/bnpview.cpp +++ b/src/bnpview.cpp @@ -1342,19 +1342,19 @@ void BNPView::notesStateChanged() // Update statusbar message : if (currentBasket()->isLocked()) - setSelectiontqStatus(i18n("Locked")); + setSelectionStatus(i18n("Locked")); else if (!basket->isLoaded()) - setSelectiontqStatus(i18n("Loading...")); + setSelectionStatus(i18n("Loading...")); else if (basket->count() == 0) - setSelectiontqStatus(i18n("No notes")); + setSelectionStatus(i18n("No notes")); else { TQString count = i18n("%n note", "%n notes", basket->count() ); TQString selecteds = i18n("%n selected", "%n selected", basket->countSelecteds()); TQString showns = (currentDecoratedBasket()->filterData().isFiltering ? i18n("all matches") : i18n("no filter")); if (basket->countFounds() != basket->count()) showns = i18n("%n match", "%n matches", basket->countFounds()); - setSelectiontqStatus( - i18n("e.g. '18 notes, 10 matches, 5 selected'", "%1, %2, %3").tqarg(count, showns, selecteds) ); + setSelectionStatus( + i18n("e.g. '18 notes, 10 matches, 5 selected'", "%1, %2, %3").arg(count, showns, selecteds) ); } // If we added a note that match the global filter, update the count number in the tree: @@ -1544,8 +1544,8 @@ TQPopupMenu* BNPView::popupMenu(const TQString &menuName) "<p>As last ressort, if you are sure the application is correctly installed " "but you had a preview version of it, try to remove the " "file %5basketui.rc</p>") - .tqarg(kapp->aboutData()->programName(), kapp->aboutData()->programName(), - stdDirs.saveLocation("data", "basket/")).tqarg(stdDirs.saveLocation("data", "basket/"), stdDirs.saveLocation("data", "basket/")), + .arg(kapp->aboutData()->programName(), kapp->aboutData()->programName(), + stdDirs.saveLocation("data", "basket/")).arg(stdDirs.saveLocation("data", "basket/"), stdDirs.saveLocation("data", "basket/")), i18n("Ressource not Found"), KMessageBox::AllowLink ); } if(!isPart()) @@ -1701,13 +1701,13 @@ void BNPView::delBasket() KMessageBox::createKMessageBox( dialog, TQMessageBox::Information, i18n("<qt>Do you really want to remove the basket <b>%1</b> and its contents?</qt>") - .tqarg(Tools::textToHTMLWithoutP(basket->basketName())), + .arg(Tools::textToHTMLWithoutP(basket->basketName())), basketsList, /*ask=*/"", /*checkboxReturn=*/0, /*options=*/KMessageBox::Notify/*, const TQString &details=TQString()*/); #endif int really = KMessageBox::questionYesNo( this, i18n("<qt>Do you really want to remove the basket <b>%1</b> and its contents?</qt>") - .tqarg(Tools::textToHTMLWithoutP(basket->basketName())), + .arg(Tools::textToHTMLWithoutP(basket->basketName())), i18n("Remove Basket") #if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x , KGuiItem(i18n("&Remove Basket"), "editdelete"), KStdGuiItem::cancel()); @@ -1721,8 +1721,8 @@ void BNPView::delBasket() TQStringList basketsList = listViewItemForBasket(basket)->childNamesTree(); if (basketsList.count() > 0) { int deleteChilds = KMessageBox::questionYesNoList( this, - i18n("<qt><b>%1</b> have the following tqchildren baskets.<br>Do you want to remove them too?</qt>") - .tqarg(Tools::textToHTMLWithoutP(basket->basketName())), + i18n("<qt><b>%1</b> have the following children baskets.<br>Do you want to remove them too?</qt>") + .arg(Tools::textToHTMLWithoutP(basket->basketName())), basketsList, i18n("Remove Children Baskets") #if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x @@ -1808,7 +1808,7 @@ void BNPView::saveAsArchive() int result = KMessageBox::questionYesNoCancel( this, "<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?") - .tqarg(KURL(destination).fileName()), + .arg(KURL(destination).fileName()), i18n("Override File?"), KGuiItem(i18n("&Override"), "filesave") ); @@ -1870,7 +1870,7 @@ void BNPView::isLockedChanged() { bool isLocked = currentBasket()->isLocked(); - setLocktqStatus(isLocked); + setLockStatus(isLocked); // m_actLockBasket->setChecked(isLocked); m_actPropBasket->setEnabled(!isLocked); @@ -1955,7 +1955,7 @@ void BNPView::showPassiveDroppedDelayed() TQPixmap contentsPixmap = NoteDrag::feedbackPixmap(m_passiveDroppedSelection); TQMimeSourceFactory::defaultFactory()->setPixmap("_passivepopup_image_", contentsPixmap); m_passivePopup->setView( - title.tqarg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), + title.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), (contentsPixmap.isNull() ? "" : "<img src=\"_passivepopup_image_\">"), kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); m_passivePopup->show(); @@ -1967,8 +1967,8 @@ void BNPView::showPassiveImpossible(const TQString &message) m_passivePopup = new KPassivePopup(Settings::useSystray() ? (TQWidget*)Global::systemTray : (TQWidget*)this); m_passivePopup->setView( TQString("<font color=red>%1</font>") - .tqarg(i18n("Basket <i>%1</i> is locked")) - .tqarg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), + .arg(i18n("Basket <i>%1</i> is locked")) + .arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), message, kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); m_passivePopup->show(); @@ -1992,7 +1992,7 @@ void BNPView::showPassiveContent(bool forceShow/* = false*/) m_passivePopup->setView( "<qt>" + kapp->makeStdCaption( currentBasket()->isLocked() ? TQString("%1 <font color=gray30>%2</font>") - .tqarg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)")) + .arg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)")) : Tools::textToHTMLWithoutP(currentBasket()->basketName()) ), message, kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); @@ -2044,14 +2044,14 @@ void BNPView::updateStatusBarHint() m_statusbar->updateStatusBarHint(); } -void BNPView::setSelectiontqStatus(TQString s) +void BNPView::setSelectionStatus(TQString s) { - m_statusbar->setSelectiontqStatus(s); + m_statusbar->setSelectionStatus(s); } -void BNPView::setLocktqStatus(bool isLocked) +void BNPView::setLockStatus(bool isLocked) { - m_statusbar->setLocktqStatus(isLocked); + m_statusbar->setLockStatus(isLocked); } void BNPView::postStatusbarMessage(const TQString& msg) @@ -2064,9 +2064,9 @@ void BNPView::setStatusBarHint(const TQString &hint) m_statusbar->setStatusBarHint(hint); } -void BNPView::setUnsavedtqStatus(bool isUnsaved) +void BNPView::setUnsavedStatus(bool isUnsaved) { - m_statusbar->setUnsavedtqStatus(isUnsaved); + m_statusbar->setUnsavedStatus(isUnsaved); } void BNPView::setActive(bool active) @@ -2299,7 +2299,7 @@ void BNPView::populateTagsMenu(KPopupMenu &menu, Note *referenceNote) sequence = currentTag->shortcut().operator TQKeySequence(); menu.insertItem(StateMenuItem::checkBoxIconSet( (referenceNote ? referenceNote->hasTag(currentTag) : false), - menu.tqcolorGroup()), + menu.colorGroup()), new StateMenuItem(currentState, sequence, true), i ); diff --git a/src/bnpview.h b/src/bnpview.h index 0025701..c987e35 100644 --- a/src/bnpview.h +++ b/src/bnpview.h @@ -24,7 +24,7 @@ #include <klistview.h> #include <kxmlguiclient.h> #include <tqtimer.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqsplitter.h> #include <tqlistview.h> #include <dcopref.h> @@ -294,11 +294,11 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface public slots: void setCaption(TQString s); void updateStatusBarHint(); - void setSelectiontqStatus(TQString s); - void setLocktqStatus(bool isLocked); + void setSelectionStatus(TQString s); + void setLockStatus(bool isLocked); void postStatusbarMessage(const TQString&); void setStatusBarHint(const TQString&); - void setUnsavedtqStatus(bool isUnsaved); + void setUnsavedStatus(bool isUnsaved); void setActive(bool active = true); KActionCollection *actionCollection() { return m_actionCollection; }; diff --git a/src/crashhandler.cpp b/src/crashhandler.cpp index bcc72a6..8a3e2b2 100644 --- a/src/crashhandler.cpp +++ b/src/crashhandler.cpp @@ -24,7 +24,7 @@ #include <tqfile.h> #include <tqregexp.h> -#include <tqtextstream.h> +#include <textstream.h> #include <cstdio> //popen, fread #include <iostream> @@ -82,7 +82,7 @@ "But, all is not lost! You could potentially help us fix the crash. " "Information describing the crash is below, so just click send, " "or if you have time, write a brief description of how the crash happened first.\n\n" - "Many thanks." ).tqarg(kapp->aboutData()->programName()) + "\n\n"; + "Many thanks." ).arg(kapp->aboutData()->programName()) + "\n\n"; body += "\n\n\n\n\n\n" + i18n( "The information below is to help the developers identify the problem, " "please do not modify it." ) + "\n\n\n\n"; @@ -96,9 +96,9 @@ ;// "TagLib: %2.%3.%4\n"; /* body = body - .tqarg( TAGLIB_MAJOR_VERSION ) - .tqarg( TAGLIB_MINOR_VERSION ) - .tqarg( TAGLIB_PATCH_VERSION );*/ + .arg( TAGLIB_MAJOR_VERSION ) + .arg( TAGLIB_MINOR_VERSION ) + .arg( TAGLIB_PATCH_VERSION );*/ #ifdef NDEBUG body += "NDEBUG: true"; @@ -163,10 +163,10 @@ if( totalFrames > 0 ) { const double validity = double(validFrames) / totalFrames; - subject += TQString("[validity: %1]").tqarg( validity, 0, 'f', 2 ); + subject += TQString("[validity: %1]").arg( validity, 0, 'f', 2 ); if( validity <= 0.5 ) useful = false; } - subject += TQString("[frames: %1]").tqarg( totalFrames, 3 /*padding*/ ); + subject += TQString("[frames: %1]").arg( totalFrames, 3 /*padding*/ ); if( bt.find( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 ) subject += "[line numbers]"; @@ -174,7 +174,7 @@ else useful = false; -// subject += TQString("[%1]").tqarg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) ); +// subject += TQString("[%1]").arg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) ); // debug() << subject << endl; @@ -206,7 +206,7 @@ std::cout << ("\n" + i18n( "%1 has crashed! We're sorry about this.\n\n" "But, all is not lost! Perhaps an upgrade is already available " "which fixes the problem. Please check your distribution's software repository." ) - .tqarg(kapp->aboutData()->programName())).local8Bit().data() << std::endl; + .arg(kapp->aboutData()->programName())).local8Bit().data() << std::endl; } //_exit() exits immediately, otherwise this diff --git a/src/debugwindow.cpp b/src/debugwindow.cpp index e86ff99..631a300 100644 --- a/src/debugwindow.cpp +++ b/src/debugwindow.cpp @@ -18,8 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <tqlayout.h> -#include <tqtextbrowser.h> +#include <layout.h> +#include <textbrowser.h> #include <tqstring.h> #include <tqevent.h> #include <klocale.h> @@ -33,19 +33,19 @@ DebugWindow::DebugWindow(TQWidget *parent, const char *name ) Global::debugWindow = this; setCaption(i18n("Debug Window")); - tqlayout = new TQVBoxLayout(this); + layout = new TQVBoxLayout(this); textBrowser = new TQTextBrowser(this); textBrowser->setWordWrap(TQTextBrowser::NoWrap); - tqlayout->addWidget(textBrowser); + layout->addWidget(textBrowser); textBrowser->show(); } DebugWindow::~DebugWindow() { delete textBrowser; - delete tqlayout; + delete layout; } void DebugWindow::postMessage(const TQString msg) diff --git a/src/debugwindow.h b/src/debugwindow.h index 5a72790..31b9911 100644 --- a/src/debugwindow.h +++ b/src/debugwindow.h @@ -46,7 +46,7 @@ class DebugWindow : public TQWidget { protected: virtual void closeEvent(TQCloseEvent *event); private: - TQVBoxLayout *tqlayout; + TQVBoxLayout *layout; TQTextBrowser *textBrowser; }; diff --git a/src/exporterdialog.cpp b/src/exporterdialog.cpp index 7ef6585..995eb32 100644 --- a/src/exporterdialog.cpp +++ b/src/exporterdialog.cpp @@ -25,7 +25,7 @@ #include <tqdir.h> #include <tqhbox.h> #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <klocale.h> #include <kconfig.h> @@ -61,10 +61,10 @@ ExporterDialog::ExporterDialog(Basket *basket, TQWidget *parent, const char *nam showTile(true); // Add a stretch at the bottom: // Duplicated code from AddBasketWizard::addStretch(TQWidget *parent): - (new TQWidget(page))->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + (new TQWidget(page))->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); // Double the width, because the filename should be visible - TQSize size(tqsizeHint()); + TQSize size(sizeHint()); resize(TQSize(size.width() * 2, size.height())); /* ========================== diff --git a/src/filter.cpp b/src/filter.cpp index 78e2b80..638ba98 100644 --- a/src/filter.cpp +++ b/src/filter.cpp @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <tqlayout.h> +#include <layout.h> //#include <ktoolbarbutton.h> #include <tqtoolbutton.h> #include <tqlabel.h> diff --git a/src/focusedwidgets.cpp b/src/focusedwidgets.cpp index ac46eec..d472555 100644 --- a/src/focusedwidgets.cpp +++ b/src/focusedwidgets.cpp @@ -67,7 +67,7 @@ void FocusedTextEdit::paste() // uint oldAutoFormating = autoFormatting(); // setAutoFormatting(AutoNone); - TQClipboard *clipboard = TQApplication::tqclipboard(); + TQClipboard *clipboard = TQApplication::clipboard(); int paragraph; int index; getCursorPosition(¶graph, &index); @@ -107,7 +107,7 @@ void FocusedTextEdit::paste() */ void FocusedTextEdit::adaptClipboardText(TQClipboard::Mode mode) { - TQClipboard *clipboard = TQApplication::tqclipboard(); + TQClipboard *clipboard = TQApplication::clipboard(); if (!clipboard) return; diff --git a/src/focusedwidgets.h b/src/focusedwidgets.h index 8478c4c..2d9ec4f 100644 --- a/src/focusedwidgets.h +++ b/src/focusedwidgets.h @@ -27,7 +27,7 @@ #include <kcombobox.h> #include <klineedit.h> #include <kapplication.h> -#include <tqclipboard.h> +#include <clipboard.h> class FocusedTextEdit : public KTextEdit { diff --git a/src/formatimporter.cpp b/src/formatimporter.cpp index f28df81..a0a24ad 100644 --- a/src/formatimporter.cpp +++ b/src/formatimporter.cpp @@ -131,7 +131,7 @@ void FormatImporter::importBaskets() if (folderName.startsWith("/")) { // It was a folder mirror: KMessageBox::information(0, i18n("<p>Folder mirroring is not possible anymore (see <a href='http://basket.kde.org/'>basket.kde.org</a> for more information).</p>" "<p>The folder <b>%1</b> has been copied for the basket needs. You can either delete this folder or delete the basket, or use both. But remember that " - "modifying one will not modify the other anymore as they are now separate entities.</p>").tqarg(folderName), i18n("Folder Mirror Import"), + "modifying one will not modify the other anymore as they are now separate entities.</p>").arg(folderName), i18n("Folder Mirror Import"), "", KMessageBox::AllowLink); // Also modify folderName to be only the folder name and not the full path anymore: TQString newFolderName = folderName; @@ -259,7 +259,7 @@ TQDomElement FormatImporter::importBasket(const TQString &folderName) "Name=%2\n" "Icon=%3\n" "Encoding=UTF-8\n" - "Type=Application\n").tqarg(runCommand, title, icon.isEmpty() ? TQString("exec") : icon); + "Type=Application\n").arg(runCommand, title, icon.isEmpty() ? TQString("exec") : icon); TQString launcherFileName = Tools::fileNameForNewFile("launcher.desktop", Global::basketsFolder() + folderName /*+ "/"*/); TQString launcherFullPath = Global::basketsFolder() + folderName /*+ "/"*/ + launcherFileName; TQFile file(launcherFullPath); diff --git a/src/htmlexporter.cpp b/src/htmlexporter.cpp index 762abe5..64fee0e 100644 --- a/src/htmlexporter.cpp +++ b/src/htmlexporter.cpp @@ -63,7 +63,7 @@ HTMLExporter::HTMLExporter(Basket *basket) int result = KMessageBox::questionYesNoCancel( 0, "<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?") - .tqarg(KURL(destination).fileName()), + .arg(KURL(destination).fileName()), i18n("Override File?"), KGuiItem(i18n("&Override"), "filesave") ); @@ -111,7 +111,7 @@ void HTMLExporter::prepareExport(Basket *basket, const TQString &fullPath) withBasketTree = (item->firstChild() != 0); // Create and empty the files folder: - TQString filesFolderPath = i18n("HTML export folder (files)", "%1_files").tqarg(filePath) + "/"; // eg.: "/home/seb/foo.html_files/" + TQString filesFolderPath = i18n("HTML export folder (files)", "%1_files").arg(filePath) + "/"; // eg.: "/home/seb/foo.html_files/" Tools::deleteRecursively(filesFolderPath); TQDir dir; dir.mkdir(filesFolderPath); @@ -136,7 +136,7 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket) } // Compute the absolute & relative paths for this basket: - filesFolderPath = i18n("HTML export folder (files)", "%1_files").tqarg(filePath) + "/"; + filesFolderPath = i18n("HTML export folder (files)", "%1_files").arg(filePath) + "/"; if (isSubBasket) { basketFilePath = basketsFolderPath + basket->folderName().left(basket->folderName().length() - 1) + ".html"; filesFolderName = "../"; @@ -145,7 +145,7 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket) basketsFolderName = ""; } else { basketFilePath = filePath; - filesFolderName = i18n("HTML export folder (files)", "%1_files").tqarg(KURL(filePath).fileName()) + "/"; + filesFolderName = i18n("HTML export folder (files)", "%1_files").arg(KURL(filePath).fileName()) + "/"; dataFolderName = filesFolderName + i18n("HTML export folder (data)", "data") + "/"; dataFolderPath = filesFolderPath + i18n("HTML export folder (data)", "data") + "/"; basketsFolderName = filesFolderName + i18n("HTML export folder (baskets)", "baskets") + "/"; @@ -289,7 +289,7 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket) // TODO: Make sure only filtered notes are exported! // if (decoration()->filterData().isFiltering) // stream << -// " <p>" << i18n("Notes matching the filter "%1":").tqarg(Tools::textToHTMLWithoutP(decoration()->filterData().string)) << "</p>\n"; +// " <p>" << i18n("Notes matching the filter "%1":").arg(Tools::textToHTMLWithoutP(decoration()->filterData().string)) << "</p>\n"; stream << " <div class=\"basketSurrounder\">\n"; @@ -315,10 +315,10 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket) " </div>\n"; stream << TQString( " </div>\n" - " <p class=\"credits\">%1</p>\n").tqarg( + " <p class=\"credits\">%1</p>\n").arg( i18n("Made with %1, a KDE tool to take notes and keep information at hand.") - .tqarg("<a href=\"http://basket.kde.org/\">%1</a> %2") - .tqarg(kapp->aboutData()->programName(), VERSION)); + .arg("<a href=\"http://basket.kde.org/\">%1</a> %2") + .arg(kapp->aboutData()->programName(), VERSION)); // Copy a transparent GIF image in the folder, needed for the JavaScript hack: TQString gifFileName = "spacer.gif"; @@ -396,7 +396,7 @@ void HTMLExporter::exportNote(Note *note, int indent) widthValue = 1; if (widthValue > 100) widthValue = 100; - width = TQString(" width=\"%1%\"").tqarg(TQString::number(widthValue)); + width = TQString(" width=\"%1%\"").arg(TQString::number(widthValue)); } stream << spaces.fill(' ', indent) << "<td class=\"column\"" << width << ">\n"; diff --git a/src/htmlexporter.h b/src/htmlexporter.h index 86b72fd..6c30933 100644 --- a/src/htmlexporter.h +++ b/src/htmlexporter.h @@ -22,7 +22,7 @@ #define HTMLEXPORTER_H #include <tqstring.h> -#include <tqtextstream.h> +#include <textstream.h> class KProgress; diff --git a/src/kcolorcombo2.cpp b/src/kcolorcombo2.cpp index f55f7af..1864081 100644 --- a/src/kcolorcombo2.cpp +++ b/src/kcolorcombo2.cpp @@ -26,7 +26,7 @@ #include <kglobalsettings.h> #include <klocale.h> #include <kcolordialog.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <kstdaccel.h> #include <kcolordrag.h> @@ -68,7 +68,7 @@ KColorPopup::~KColorPopup() #include <tqcursor.h> -void KColorPopup::retqlayout() // FIXME: retqlayout should NOT redraw the pixmap! +void KColorPopup::relayout() // FIXME: relayout should NOT redraw the pixmap! { int columnCount = m_selector->columnCount(); int rowCount = m_selector->rowCount(); @@ -240,7 +240,7 @@ void KColorPopup::mouseMoveEvent(TQMouseEvent *event) m_selectedColumn = (x - FRAME_WIDTH - MARGIN + 2) / (colorWidth + MARGIN); m_selectedRow = (y - FRAME_WIDTH - MARGIN + 2) / (colorHeight + MARGIN); - retqlayout(); + relayout(); update(); } @@ -288,7 +288,7 @@ void KColorPopup::keyPressEvent(TQKeyEvent *event) if (row != m_selectedRow || column != m_selectedColumn) { m_selectedRow = row; m_selectedColumn = column; - retqlayout(); + relayout(); update(); } } @@ -491,7 +491,7 @@ void KColorCombo2::newColorArray(int columnCount, int rowCount) for (int i = 0; i < columnCount; ++i) m_colorArray[i] = new TQColor[rowCount]; - m_popup->retqlayout(); + m_popup->relayout(); } void KColorCombo2::setColorAt(int column, int row, const TQColor &color) @@ -634,13 +634,13 @@ void KColorCombo2::popup() TQPoint popupPoint = mapToGlobal(TQPoint(0, 0)); - int popupHeight = m_popup->tqsizeHint().height(); + int popupHeight = m_popup->sizeHint().height(); if (popupPoint.y() + height() + popupHeight > desk.bottom()) popupPoint.setY(popupPoint.y() - popupHeight); else popupPoint.setY(popupPoint.y() + height()); - int popupWidth = m_popup->tqsizeHint().width(); + int popupWidth = m_popup->sizeHint().width(); if (popupPoint.x() + popupWidth > desk.right()) popupPoint.setX(desk.right() - popupWidth); @@ -654,7 +654,7 @@ void KColorCombo2::popup() m_popup->move(popupPoint); //m_popup->setColor(m_color); m_popup->doSelection(); - m_popup->retqlayout(); // FIXME: In aboutToShow() ? + m_popup->relayout(); // FIXME: In aboutToShow() ? #if 0 //#ifndef TQT_NO_EFFECTS if (TQApplication::isEffectEnabled(UI_AnimateCombo)) { @@ -745,10 +745,10 @@ void KColorCombo2::keyPressEvent(TQKeyEvent *event) if (KStdAccel::copy().contains(key)) { TQMimeSource *mime = new KColorDrag(effectiveColor()); - TQApplication::tqclipboard()->setData(mime, TQClipboard::Clipboard); + TQApplication::clipboard()->setData(mime, TQClipboard::Clipboard); } else if (KStdAccel::paste().contains(key)) { TQColor color; - KColorDrag::decode(TQApplication::tqclipboard()->data(TQClipboard::Clipboard), color); + KColorDrag::decode(TQApplication::clipboard()->data(TQClipboard::Clipboard), color); setColor(color); } else TQComboBox::keyPressEvent(event); @@ -758,7 +758,7 @@ void KColorCombo2::fontChange(const TQFont &oldFont) { // Since the color-rectangle is the same height of the text, we should resize it if the font change: updateComboBox(); - TQComboBox::fontChange(oldFont); // To update tqgeometry. + TQComboBox::fontChange(oldFont); // To update geometry. } void KColorCombo2::virtual_hook(int /*id*/, void */*data*/) diff --git a/src/kcolorcombo2.h b/src/kcolorcombo2.h index b76f538..1862051 100644 --- a/src/kcolorcombo2.h +++ b/src/kcolorcombo2.h @@ -316,7 +316,7 @@ class KColorPopup : public TQWidget public: KColorPopup(KColorCombo2 *parent); ~KColorPopup(); - void retqlayout(); // updateGeometry() ?? + void relayout(); // updateGeometry() ?? protected: void paintEvent(TQPaintEvent */*event*/); void mouseMoveEvent(TQMouseEvent *event); diff --git a/src/kgpgme.cpp b/src/kgpgme.cpp index cc5662e..54db06b 100644 --- a/src/kgpgme.cpp +++ b/src/kgpgme.cpp @@ -29,7 +29,7 @@ #include <klistview.h> #include <kdebug.h> #include <tqcheckbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <klocale.h> #include <locale.h> @@ -139,7 +139,7 @@ void KGpgMe::init(gpgme_protocol_t proto) err = gpgme_engine_check_version(proto); if(err) { KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") - .tqarg(gpgme_strsource(err)).tqarg(gpgme_strerror(err))); + .arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); } } @@ -221,7 +221,7 @@ KGpgKeyList KGpgMe::keys(bool privateKeys /* = false */) const if(err) { KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") - .tqarg(gpgme_strsource(err)).tqarg(gpgme_strerror(err))); + .arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); } else { result = gpgme_op_keylist_result(m_ctx); @@ -263,8 +263,8 @@ bool KGpgMe::encrypt(const TQByteArray& inBuffer, TQ_ULONG length, result = gpgme_op_encrypt_result(m_ctx); if (result->invalid_recipients) { KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") - .tqarg(i18n("That public key is not meant for encryption")) - .tqarg(result->invalid_recipients->fpr)); + .arg(i18n("That public key is not meant for encryption")) + .arg(result->invalid_recipients->fpr)); } else { err = readToBuffer(out, outBuffer); @@ -276,7 +276,7 @@ bool KGpgMe::encrypt(const TQByteArray& inBuffer, TQ_ULONG length, } if(err != GPG_ERR_NO_ERROR && err != GPG_ERR_CANCELED) { KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") - .tqarg(gpgme_strsource(err)).tqarg(gpgme_strerror(err))); + .arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); } if(err != GPG_ERR_NO_ERROR) clearCache(); @@ -306,8 +306,8 @@ bool KGpgMe::decrypt(const TQByteArray& inBuffer, TQByteArray* outBuffer) result = gpgme_op_decrypt_result(m_ctx); if(result->unsupported_algorithm) { KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") - .tqarg(i18n("Unsupported algorithm")) - .tqarg(result->unsupported_algorithm)); + .arg(i18n("Unsupported algorithm")) + .arg(result->unsupported_algorithm)); } else { err = readToBuffer(out, outBuffer); @@ -318,7 +318,7 @@ bool KGpgMe::decrypt(const TQByteArray& inBuffer, TQByteArray* outBuffer) } if(err != GPG_ERR_NO_ERROR && err != GPG_ERR_CANCELED) { KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") - .tqarg(gpgme_strsource(err)).tqarg(gpgme_strerror(err))); + .arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); } if(err != GPG_ERR_NO_ERROR) clearCache(); @@ -346,7 +346,7 @@ gpgme_error_t KGpgMe::readToBuffer(gpgme_data_t in, TQByteArray* outBuffer) cons if(buf) { while((ret = gpgme_data_read(in, buf, BUF_SIZE)) > 0) { uint size = outBuffer->size(); - if(outBuffer->tqresize(size + ret)) + if(outBuffer->resize(size + ret)) memcpy(outBuffer->data() + size, buf, ret); } if(ret < 0) diff --git a/src/kiconcanvas.cpp b/src/kiconcanvas.cpp index a5d25e5..a96ed6d 100644 --- a/src/kiconcanvas.cpp +++ b/src/kiconcanvas.cpp @@ -180,7 +180,7 @@ void KIconCanvas::slotLoadFiles() // Calling kapp->processEvents() makes the iconview flicker like hell // (it's being repainted once for every new item), so we don't do this. - // Instead, we directly tqrepaint the progress bar without going through + // Instead, we directly repaint the progress bar without going through // the event-loop. We do that just once for every 10th item so that // the progress bar doesn't flicker in turn. (pfeiffer) // FIXME: TQt4 will have double buffering diff --git a/src/kicondialog.cpp b/src/kicondialog.cpp index 85e923e..295fdb4 100644 --- a/src/kicondialog.cpp +++ b/src/kicondialog.cpp @@ -86,7 +86,7 @@ KIconDialog::KIconDialog(TQWidget *parent, const char*) d = new KIconDialogPrivate; mpLoader = KGlobal::iconLoader(); init(); - resize(tqminimumSize()); + resize(minimumSize()); } KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *parent, @@ -256,7 +256,7 @@ void KIconDialog::setup(KIcon::Group group, KIcon::Context context, d->extendedContext = static_cast<ExtendedContext>( ( context == KIcon::Any ) ? ALL : context + 1 ); - // We cannot change tqlayout because it is protected ;-( + // We cannot change layout because it is protected ;-( // FIXME: TQt4 we will be able to inherit from both TQDialog and our GUI d->ui->listBox->setEnabled(!lockContext); d->ui->browseButton->setEnabled(!lockBrowse); @@ -277,7 +277,7 @@ void KIconDialog::setCustomLocation( const TQString& location ) if (location.isEmpty()) { - mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::tqfromLatin1("*.png")); + mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); } else { mFileList = mpLoader->queryIconsByDir(location); } @@ -304,7 +304,7 @@ void KIconDialog::showDialog() { d->custom = TQString(); - // Make it so tqminimumSize returns correct value + // Make it so minimumSize returns correct value d->ui->filterLabel->hide(); d->ui->searchLine->hide(); d->ui->progressBar->show(); @@ -313,7 +313,7 @@ void KIconDialog::showDialog() show(); // FIXME: this should be before show() but it doesn't work ;-( - resize(tqminimumSize()); + resize(minimumSize()); showIcons(); } diff --git a/src/kicondialogui.ui b/src/kicondialogui.ui index e29c0a3..d3febc8 100644 --- a/src/kicondialogui.ui +++ b/src/kicondialogui.ui @@ -21,7 +21,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>0</width> <height>0</height> @@ -54,7 +54,7 @@ <property name="name"> <cstring>iconCanvas</cstring> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>370</width> <height>290</height> @@ -72,7 +72,7 @@ </widget> <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>tqlayout4</cstring> + <cstring>layout4</cstring> </property> <vbox> <property name="name"> @@ -83,7 +83,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout3</cstring> + <cstring>layout3</cstring> </property> <hbox> <property name="name"> diff --git a/src/likeback.cpp b/src/likeback.cpp index aafcab9..d55f3bc 100644 --- a/src/likeback.cpp +++ b/src/likeback.cpp @@ -27,7 +27,7 @@ #include <klocale.h> #include <kdebug.h> #include <kmessagebox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtoolbutton.h> #include <kpushbutton.h> #include <tqcheckbox.h> @@ -36,8 +36,8 @@ #include <tqvgroupbox.h> #include <kguiitem.h> #include <tqpopupmenu.h> -#include <tqtextedit.h> -#include <tqlayout.h> +#include <textedit.h> +#include <layout.h> #include <tqlabel.h> #include <kdialogbase.h> #include <tqhttp.h> @@ -62,7 +62,7 @@ LikeBackBar::LikeBackBar(LikeBack *likeBack) : TQWidget(0, "LikeBackBar", TQt::WX11BypassWM | TQt::WStyle_NoBorder | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop | TQt::WStyle_NoBorder | TQt::TQt::WGroupLeader) , m_likeBack(likeBack) { - TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small); TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", KIcon::Small); @@ -74,28 +74,28 @@ LikeBackBar::LikeBackBar(LikeBack *likeBack) m_likeButton->setTextLabel("<p>" + i18n("Send application developers a comment about something you like")); m_likeButton->setAutoRaise(true); connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedLike()) ); - tqlayout->add(m_likeButton); + layout->add(m_likeButton); m_dislikeButton = new TQToolButton(this, "likeback_dislike"); m_dislikeButton->setIconSet(dislikeIconSet); m_dislikeButton->setTextLabel("<p>" + i18n("Send application developers a comment about something you dislike")); m_dislikeButton->setAutoRaise(true); connect( m_dislikeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedDislike()) ); - tqlayout->add(m_dislikeButton); + layout->add(m_dislikeButton); m_bugButton = new TQToolButton(this, "likeback_bug"); m_bugButton->setIconSet(bugIconSet); m_bugButton->setTextLabel("<p>" + i18n("Send application developers a comment about an improper behavior of the application")); m_bugButton->setAutoRaise(true); connect( m_bugButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedBug()) ); - tqlayout->add(m_bugButton); + layout->add(m_bugButton); m_featureButton = new TQToolButton(this, "likeback_feature"); m_featureButton->setIconSet(featureIconSet); m_featureButton->setTextLabel("<p>" + i18n("Send application developers a comment about a new feature you desire")); m_featureButton->setAutoRaise(true); connect( m_featureButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedFeature()) ); - tqlayout->add(m_featureButton); + layout->add(m_featureButton); connect( &m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoMove()) ); @@ -232,7 +232,7 @@ LikeBack::LikeBack(Button buttons, bool showBarByDefault, KConfig *config, const // Initialize the button-bar: d->bar = new LikeBackBar(this); - d->bar->resize(d->bar->tqsizeHint()); + d->bar->resize(d->bar->sizeHint()); // Show the information message if it is the first time, and if the button-bar is shown: static const char *messageShown = "LikeBack_starting_information"; @@ -430,7 +430,7 @@ void LikeBack::showInformationMessage() "<p><b>" + (isDevelopmentVersion(d->aboutData->version()) ? i18n("Welcome to this testing version of %1.") : i18n("Welcome to %1.") - ).tqarg(d->aboutData->programName()) + "</b></p>" + ).arg(d->aboutData->programName()) + "</b></p>" "<p>" + i18n("To help us improve it, your comments are important.") + "</p>" "<p>" + ((buttons & LikeBack::Like) && (buttons & LikeBack::Dislike) ? @@ -583,7 +583,7 @@ bool LikeBack::isDevelopmentVersion(const TQString &version) if (m_process) return; m_process = new KProcess(); - *m_process << TQString::tqfromLatin1("kcmshell") << TQString::tqfromLatin1("kcm_useraccount"); + *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount"); connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(fetchUserEmail()) ); if (!m_process->start()) { kdDebug() << "Couldn't start kcmshell.." << endl; @@ -604,23 +604,23 @@ void LikeBack::fetchUserEmail() // m_configureEmail->setEnabled(true); // ### KDE4: why oh why is KEmailSettings in kio? - KConfig emailConf( TQString::tqfromLatin1("emaildefaults") ); + KConfig emailConf( TQString::fromLatin1("emaildefaults") ); // find out the default profile - emailConf.setGroup(TQString::tqfromLatin1("Defaults")); - TQString profile = TQString::tqfromLatin1("PROFILE_"); - profile += emailConf.readEntry(TQString::tqfromLatin1("Profile"), TQString::tqfromLatin1("Default")); + emailConf.setGroup(TQString::fromLatin1("Defaults")); + TQString profile = TQString::fromLatin1("PROFILE_"); + profile += emailConf.readEntry(TQString::fromLatin1("Profile"), TQString::fromLatin1("Default")); emailConf.setGroup(profile); - TQString fromaddr = emailConf.readEntry(TQString::tqfromLatin1("EmailAddress")); + TQString fromaddr = emailConf.readEntry(TQString::fromLatin1("EmailAddress")); if (fromaddr.isEmpty()) { struct passwd *p; p = getpwuid(getuid()); - d->fetchedEmail = TQString::tqfromLatin1(p->pw_name); + d->fetchedEmail = TQString::fromLatin1(p->pw_name); } else { - TQString name = emailConf.readEntry(TQString::tqfromLatin1("FullName")); + TQString name = emailConf.readEntry(TQString::fromLatin1("FullName")); if (!name.isEmpty()) - d->fetchedEmail = /*name + TQString::tqfromLatin1(" <") +*/ fromaddr /*+ TQString::tqfromLatin1(">")*/; + d->fetchedEmail = /*name + TQString::fromLatin1(" <") +*/ fromaddr /*+ TQString::fromLatin1(">")*/; } // m_from->setText( fromaddr ); } @@ -670,7 +670,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC TQPixmap likePixmap = kapp->iconLoader()->loadIcon("likeback_like", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); TQLabel *likeIcon = new TQLabel(buttons); likeIcon->setPixmap(likePixmap); - likeIcon->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + likeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); TQRadioButton *likeButton = new TQRadioButton(i18n("Something you &like"), buttons); buttonsGrid->addWidget(likeIcon, /*row=*/0, /*column=*/0); buttonsGrid->addWidget(likeButton, /*row=*/0, /*column=*/1); @@ -680,7 +680,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC TQPixmap dislikePixmap = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); TQLabel *dislikeIcon = new TQLabel(buttons); dislikeIcon->setPixmap(dislikePixmap); - dislikeIcon->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + dislikeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); TQRadioButton *dislikeButton = new TQRadioButton(i18n("Something you &dislike"), buttons); buttonsGrid->addWidget(dislikeIcon, /*row=*/1, /*column=*/0); buttonsGrid->addWidget(dislikeButton, /*row=*/1, /*column=*/1); @@ -690,7 +690,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC TQPixmap bugPixmap = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); TQLabel *bugIcon = new TQLabel(buttons); bugIcon->setPixmap(bugPixmap); - bugIcon->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + bugIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); TQRadioButton *bugButton = new TQRadioButton(i18n("An improper &behavior of this application"), buttons); buttonsGrid->addWidget(bugIcon, /*row=*/2, /*column=*/0); buttonsGrid->addWidget(bugButton, /*row=*/2, /*column=*/1); @@ -700,7 +700,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC TQPixmap featurePixmap = kapp->iconLoader()->loadIcon("likeback_feature", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); TQLabel *featureIcon = new TQLabel(buttons); featureIcon->setPixmap(featurePixmap); - featureIcon->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + featureIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); TQRadioButton *featureButton = new TQRadioButton(i18n("A new &feature you desire"), buttons); buttonsGrid->addWidget(featureIcon, /*row=*/3, /*column=*/0); buttonsGrid->addWidget(featureButton, /*row=*/3, /*column=*/1); @@ -725,7 +725,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC setButtonGuiItem(Default, KGuiItem(i18n("&Email Address..."), "mail_generic")); - resize(TQSize(kapp->desktop()->width() * 1 / 2, kapp->desktop()->height() * 3 / 5).expandedTo(tqsizeHint())); + resize(TQSize(kapp->desktop()->width() * 1 / 2, kapp->desktop()->height() * 3 / 5).expandedTo(sizeHint())); TQAction *sendShortcut = new TQAction(this); sendShortcut->setAccel(TQString("Ctrl+Return")); @@ -740,7 +740,7 @@ LikeBackDialog::~LikeBackDialog() TQString LikeBackDialog::introductionText() { - TQString text = "<p>" + i18n("Please provide a brief description of your opinion of %1.").tqarg(m_likeBack->aboutData()->programName()) + " "; + TQString text = "<p>" + i18n("Please provide a brief description of your opinion of %1.").arg(m_likeBack->aboutData()->programName()) + " "; TQString languagesMessage = ""; if (!m_likeBack->acceptedLocales().isEmpty() && !m_likeBack->acceptedLanguagesMessage().isEmpty()) { @@ -760,7 +760,7 @@ TQString LikeBackDialog::introductionText() // TODO: Replace the URL with a localized one: text += languagesMessage + " " + i18n("You may be able to use an <a href=\"%1\">online translation tool</a>.") - .tqarg("http://www.google.com/language_tools?hl=" + KGlobal::locale()->language()) + .arg("http://www.google.com/language_tools?hl=" + KGlobal::locale()->language()) + " "; // If both "I Like" and "I Dislike" buttons are shown and one is clicked: diff --git a/src/linklabel.cpp b/src/linklabel.cpp index c2060f7..5b66097 100644 --- a/src/linklabel.cpp +++ b/src/linklabel.cpp @@ -20,7 +20,7 @@ #include <tqlabel.h> #include <kurl.h> -#include <tqlayout.h> +#include <layout.h> #include <kiconloader.h> #include <tqcursor.h> #include <klocale.h> @@ -132,7 +132,7 @@ LinkLook* LinkLook::lookForURL(const KURL &url) TQString LinkLook::toCSS(const TQString &cssClass, const TQColor &defaultTextColor) const { // Set the link class: - TQString css = TQString(" .%1 a { display: block; width: 100%;").tqarg(cssClass); + TQString css = TQString(" .%1 a { display: block; width: 100%;").arg(cssClass); if (underlineOutside()) css += " text-decoration: underline;"; else @@ -142,7 +142,7 @@ TQString LinkLook::toCSS(const TQString &cssClass, const TQColor &defaultTextCol if (m_bold == true) css += " font-weight: bold;"; TQColor textColor = (color().isValid() || m_useLinkColor ? effectiveColor() : defaultTextColor); - css += TQString(" color: %1; }\n").tqarg(textColor.name()); + css += TQString(" color: %1; }\n").arg(textColor.name()); // Set the hover state class: TQString hover; @@ -153,12 +153,12 @@ TQString LinkLook::toCSS(const TQString &cssClass, const TQColor &defaultTextCol if (effectiveHoverColor() != effectiveColor()) { if (!hover.isEmpty()) hover += " "; - hover += TQString("color: %4;").tqarg(effectiveHoverColor().name()); + hover += TQString("color: %4;").arg(effectiveHoverColor().name()); } // But include it only if it contain a different style than non-hover state: if (!hover.isEmpty()) - css += TQString(" .%1 a:hover { %2 }\n").tqarg(cssClass, hover); + css += TQString(" .%1 a:hover { %2 }\n").arg(cssClass, hover); return css; } @@ -231,7 +231,7 @@ void LinkLabel::setLook(LinkLook *look) // FIXME: called externaly (so, without font.setUnderline(look->underlineOutside()); font.setItalic(look->italic()); m_title->setFont(font); - m_title->setPaletteForegroundColor( m_isSelected ? KApplication::tqpalette().active().highlightedText() : look->effectiveColor() ); + m_title->setPaletteForegroundColor( m_isSelected ? KApplication::palette().active().highlightedText() : look->effectiveColor() ); m_icon->setShown( m_icon->pixmap() && ! m_icon->pixmap()->isNull() ); @@ -246,7 +246,7 @@ void LinkLabel::setAlign(int hAlign, int vAlign) if (!m_look) return; - // Define tqalignment flags : + // Define alignment flags : //FIXME TODO: Use directly flags ! int hFlag, vFlag, wBreak; switch (hAlign) { @@ -269,19 +269,19 @@ void LinkLabel::setAlign(int hAlign, int vAlign) m_layout->remove(m_title); m_layout->removeItem(m_spacer2); - // Otherwise, tqminimumSize will be incoherent (last size ? ) + // Otherwise, minimumSize will be incoherent (last size ? ) m_layout->setResizeMode(TQLayout::Minimum); // And re-populate the widget with the appropriates things and order bool addSpacers = hAlign == 1; m_layout->setDirection(TQBoxLayout::LeftToRight); - //m_title->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Maximum/*Expanding*/, 0, 0, false) ); - m_icon->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred/*Expanding*/, 0, 0, false) ); + //m_title->setSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Maximum/*Expanding*/, 0, 0, false) ); + m_icon->setSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred/*Expanding*/, 0, 0, false) ); m_spacer1->changeSize( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Preferred/*Expanding*/ ); m_spacer2->changeSize( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Preferred/*Expanding*/ ); - m_icon->tqsetAlignment( hFlag | vFlag ); - m_title->tqsetAlignment( hFlag | vFlag | wBreak ); + m_icon->setAlignment( hFlag | vFlag ); + m_title->setAlignment( hFlag | vFlag | wBreak ); if ( addSpacers && (vAlign != 0) || (m_title->text().isEmpty() && hAlign == 2) ) m_layout->addItem(m_spacer1); @@ -323,7 +323,7 @@ void LinkLabel::setSelected(bool selected) { m_isSelected = selected; if (selected) - m_title->setPaletteForegroundColor(KApplication::tqpalette().active().highlightedText()); + m_title->setPaletteForegroundColor(KApplication::palette().active().highlightedText()); else if (m_isHovered) m_title->setPaletteForegroundColor(m_look->effectiveHoverColor()); else @@ -392,7 +392,7 @@ void LinkDisplay::setLink(const TQString &title, const TQString &icon, const TQP m_font = font; // "Constants": - int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int LINK_MARGIN = BUTTON_MARGIN + 2; // Recompute m_minWidth: @@ -422,15 +422,15 @@ void LinkDisplay::setWidth(int width) /** Paint on @p painter * in (@p x, @p y, @p width, @p height) - * using @p tqcolorGroup for the button drawing (if @p isHovered) + * using @p colorGroup for the button drawing (if @p isHovered) * and the LinkLook color() for the text, - * unless [the LinkLook !color.isValid() and it does not useLinkColor()] or [@p isDefaultColor is false]: in this case it will use @p tqcolorGroup.text(). + * unless [the LinkLook !color.isValid() and it does not useLinkColor()] or [@p isDefaultColor is false]: in this case it will use @p colorGroup.text(). * It will draw the button if @p isIconButtonHovered. */ -void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, const TQColorGroup &tqcolorGroup, +void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered, bool isIconButtonHovered) const { - int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int LINK_MARGIN = BUTTON_MARGIN + 2; TQPixmap pixmap; @@ -450,7 +450,7 @@ void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, // Draw the button (if any) and the icon: if (isHovered) kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonCommand, painter, TQRect(-1, -1, iconPreviewWidth + 2*BUTTON_MARGIN, height + 2), - tqcolorGroup, TQStyle::Style_Enabled | (isIconButtonHovered ? TQStyle::Style_MouseOver : 0)); + colorGroup, TQStyle::Style_Enabled | (isIconButtonHovered ? TQStyle::Style_MouseOver : 0)); painter->drawPixmap(x + BUTTON_MARGIN - 1 + pixmapX, y + pixmapY, pixmap); // Figure out the text color: @@ -459,7 +459,7 @@ void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, else if (isIconButtonHovered) painter->setPen(m_look->effectiveHoverColor()); else if (!isDefaultColor || (!m_look->color().isValid() && !m_look->useLinkColor())) // If the color is FORCED or if the link color default to the text color: - painter->setPen(tqcolorGroup.text()); + painter->setPen(colorGroup.text()); else painter->setPen(m_look->effectiveColor()); // Draw the text: @@ -468,14 +468,14 @@ void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak, m_title); } -TQPixmap LinkDisplay::feedbackPixmap(int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor) +TQPixmap LinkDisplay::feedbackPixmap(int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor) { int theWidth = TQMIN(width, maxWidth()); int theHeight = TQMIN(height, heightForWidth(theWidth)); TQPixmap pixmap(theWidth, theHeight); - pixmap.fill(tqcolorGroup.background()); + pixmap.fill(colorGroup.background()); TQPainter painter(&pixmap); - paint(&painter, 0, 0, theWidth, theHeight, tqcolorGroup, isDefaultColor, + paint(&painter, 0, 0, theWidth, theHeight, colorGroup, isDefaultColor, /*isSelected=*/false, /*isHovered=*/false, /*isIconButtonHovered=*/false); painter.end(); return pixmap; @@ -483,7 +483,7 @@ TQPixmap LinkDisplay::feedbackPixmap(int width, int height, const TQColorGroup & bool LinkDisplay::iconButtonAt(const TQPoint &pos) const { - int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); // int LINK_MARGIN = BUTTON_MARGIN + 2; int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); @@ -492,7 +492,7 @@ bool LinkDisplay::iconButtonAt(const TQPoint &pos) const TQRect LinkDisplay::iconButtonRect() const { - int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); // int LINK_MARGIN = BUTTON_MARGIN + 2; int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); @@ -517,7 +517,7 @@ TQFont LinkDisplay::labelFont(TQFont font, bool isIconButtonHovered) const int LinkDisplay::heightForWidth(int width) const { - int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); + int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int LINK_MARGIN = BUTTON_MARGIN + 2; int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); int iconPreviewHeight = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.height() : 0)); @@ -540,16 +540,16 @@ TQString LinkDisplay::toHtml(HTMLExporter *exporter, const KURL &url, const TQSt TQString fullPath = exporter->iconsFolderPath + fileName; m_preview.save(fullPath, "PNG"); linkIcon = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">") - .tqarg(exporter->iconsFolderName + fileName, TQString::number(m_preview.width()), TQString::number(m_preview.height())); + .arg(exporter->iconsFolderName + fileName, TQString::number(m_preview.width()), TQString::number(m_preview.height())); } else { linkIcon = exporter->iconsFolderName + exporter->copyIcon(m_icon, m_look->iconSize()); linkIcon = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">") - .tqarg(linkIcon, TQString::number(m_look->iconSize()), TQString::number(m_look->iconSize())); + .arg(linkIcon, TQString::number(m_look->iconSize()), TQString::number(m_look->iconSize())); } TQString linkTitle = Tools::textToHTMLWithoutP(title.isEmpty() ? m_title : title); - return TQString("<a href=\"%1\">%2 %3</a>").tqarg(url.prettyURL(), linkIcon, linkTitle); + return TQString("<a href=\"%1\">%2 %3</a>").arg(url.prettyURL(), linkIcon, linkTitle); } /** LinkLookEditWidget **/ @@ -559,15 +559,15 @@ LinkLookEditWidget::LinkLookEditWidget(KCModule *module, const TQString exTitle, : TQWidget(parent, name, fl) { TQLabel *label; - TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialogBase::marginHint(), KDialogBase::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialogBase::marginHint(), KDialogBase::spacingHint()); m_italic = new TQCheckBox(i18n("I&talic"), this); - tqlayout->addWidget(m_italic); + layout->addWidget(m_italic); m_bold = new TQCheckBox(i18n("&Bold"), this); - tqlayout->addWidget(m_bold); + layout->addWidget(m_bold); - TQGridLayout *gl = new TQGridLayout(tqlayout, /*rows=*//*(look->canPreview() ? 5 : 4)*/5, /*columns=*//*3*/4); + TQGridLayout *gl = new TQGridLayout(layout, /*rows=*//*(look->canPreview() ? 5 : 4)*/5, /*columns=*//*3*/4); gl->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding), 1, /*2*/3); m_underlining = new TQComboBox(false, this); @@ -614,7 +614,7 @@ LinkLookEditWidget::LinkLookEditWidget(KCModule *module, const TQString exTitle, "<p>If you do not want the application to create notes depending on the content of the files you drop, " "go to the \"General\" page and uncheck \"Image or animation\" in the \"View Content of Added Files for the Following Types\" group.</p>") // TODO: Note: you can resize down maximum size of images... - .tqarg(kapp->aboutData()->programName(), kapp->aboutData()->programName()), + .arg(kapp->aboutData()->programName(), kapp->aboutData()->programName()), this); gl->addWidget(m_label, 4, 0); gl->addWidget(m_preview, 4, 1); @@ -623,9 +623,9 @@ LinkLookEditWidget::LinkLookEditWidget(KCModule *module, const TQString exTitle, TQGroupBox *gb = new TQHGroupBox(i18n("Example"), this); m_exLook = new LinkLook; m_example = new LinkLabel(exTitle, exIcon, m_exLook, 1, 1, gb); - m_example->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_example->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_example->setCursor(TQCursor(TQt::PointingHandCursor)); - tqlayout->addWidget(gb); + layout->addWidget(gb); m_exTitle = exTitle; m_exIcon = exIcon; diff --git a/src/linklabel.h b/src/linklabel.h index 13283e3..7266ad4 100644 --- a/src/linklabel.h +++ b/src/linklabel.h @@ -152,8 +152,8 @@ class LinkDisplay int width() const { return m_width; } /// << @return the width of the link. It is never less than minWidth()! int height() const { return m_height; } /// << @return the height if the link after having set it a width. // And finaly, use it: - void paint(TQPainter *painter, int x, int y, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered, bool isIconButtonHovered) const; /// << Draw the link on a painter. Set textColor to be !isValid() to use the LinkLook color. Otherwise it will use this color! - TQPixmap feedbackPixmap(int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor); /// << @return the pixmap to put under the cursor while dragging this object. + void paint(TQPainter *painter, int x, int y, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered, bool isIconButtonHovered) const; /// << Draw the link on a painter. Set textColor to be !isValid() to use the LinkLook color. Otherwise it will use this color! + TQPixmap feedbackPixmap(int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor); /// << @return the pixmap to put under the cursor while dragging this object. // Eventually get some information about the link display: bool iconButtonAt(const TQPoint &pos) const; /// << @return true if the icon button is under point @p pos. TQRect iconButtonRect() const; /// << @return the rectangle of the icon button. diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index dabecb1..036c436 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include <tqtabwidget.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqcursor.h> #include <tqwhatsthis.h> @@ -111,7 +111,7 @@ MainWindow::MainWindow(TQWidget *parent, const char *name) statusBar()->show(); statusBar()->setSizeGripEnabled(true); - setAutoSaveSettings(/*groupName=*/TQString::tqfromLatin1("MainWindow"), /*saveWindowSize=*//*FIXME:false:Why was it false??*/true); + setAutoSaveSettings(/*groupName=*/TQString::fromLatin1("MainWindow"), /*saveWindowSize=*//*FIXME:false:Why was it false??*/true); // m_actShowToolbar->setChecked( toolBar()->isShown() ); m_actShowStatusbar->setChecked( statusBar()->isShown() ); @@ -193,7 +193,7 @@ void MainWindow::slotNewToolbarConfig() // This is called when OK or Apply is cl createGUI("basketui.rc"); // TODO: Reconnect tags menu aboutToShow() ?? if (!Global::bnpView->isPart()) Global::bnpView->connectTagsMenu(); // The Tags menu was created again! - plugActionList( TQString::tqfromLatin1("go_baskets_list"), actBasketsList); + plugActionList( TQString::fromLatin1("go_baskets_list"), actBasketsList); applyMainWindowSettings( KGlobal::config(), autoSaveGroup() ); } @@ -221,13 +221,13 @@ void MainWindow::polish() bool shouldSave = false; // If position and size has never been set, set nice ones: - // - Set size to tqsizeHint() + // - Set size to sizeHint() // - Keep the window manager placing the window where it want and save this if (Settings::mainWindowSize().isEmpty()) { // std::cout << "Main Window Position: Initial Set in show()" << std::endl; int defaultWidth = kapp->desktop()->width() * 5 / 6; int defaultHeight = kapp->desktop()->height() * 5 / 6; - resize(defaultWidth, defaultHeight); // tqsizeHint() is bad (too small) and we want the user to have a good default area size + resize(defaultWidth, defaultHeight); // sizeHint() is bad (too small) and we want the user to have a good default area size shouldSave = true; } else { // std::cout << "Main Window Position: Recall in show(x=" @@ -307,7 +307,7 @@ bool MainWindow::queryClose() bool MainWindow::askForQuit() { - TQString message = i18n("<p>Do you really want to quit %1?</p>").tqarg(kapp->aboutData()->programName()); + TQString message = i18n("<p>Do you really want to quit %1?</p>").arg(kapp->aboutData()->programName()); if (Settings::useSystray()) message += i18n("<p>Notice that you do not have to quit the application before ending your KDE session. " "If you end your session while the application is still running, the application will be reloaded the next time you log in.</p>"); diff --git a/src/mainwindow.h b/src/mainwindow.h index 7bd8e1b..0eaebe1 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -28,7 +28,7 @@ #include <ksystemtray.h> #include <tqptrlist.h> #include <tqpoint.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <kaction.h> #include <tqpixmap.h> #include <tqdesktopwidget.h> diff --git a/src/newbasketdialog.cpp b/src/newbasketdialog.cpp index 82ee60e..6cc2b3d 100644 --- a/src/newbasketdialog.cpp +++ b/src/newbasketdialog.cpp @@ -21,7 +21,7 @@ #include <kicondialog.h> #include <tqlineedit.h> #include <kiconview.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <klocale.h> #include <kglobalsettings.h> @@ -98,7 +98,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro m_icon->setIconType(KIcon::NoGroup, KIcon::Action); m_icon->setIconSize(16); m_icon->setIcon(m_defaultProperties.icon.isEmpty() ? "basket" : m_defaultProperties.icon); - int size = TQMAX(m_icon->tqsizeHint().width(), m_icon->tqsizeHint().height()); + int size = TQMAX(m_icon->sizeHint().width(), m_icon->sizeHint().height()); m_icon->setFixedSize(size, size); // Make it square! TQToolTip::add(m_icon, i18n("Icon")); m_name = new TQLineEdit(/*i18n("Basket"), */page); @@ -108,7 +108,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro TQToolTip::add(m_name, i18n("Name")); m_backgroundColor = new KColorCombo2(TQColor(), KGlobalSettings::baseColor(), page); m_backgroundColor->setColor(TQColor()); - m_backgroundColor->setFixedSize(m_backgroundColor->tqsizeHint()); + m_backgroundColor->setFixedSize(m_backgroundColor->sizeHint()); m_backgroundColor->setColor(m_defaultProperties.backgroundColor); TQToolTip::add(m_backgroundColor, i18n("Background color")); nameLayout->addWidget(m_icon); @@ -116,7 +116,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro nameLayout->addWidget(m_backgroundColor); topLayout->addLayout(nameLayout); - TQHBoxLayout *tqlayout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint()); + TQHBoxLayout *layout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint()); KPushButton *button = new KPushButton( KGuiItem(i18n("&Manage Templates..."), "configure"), page ); connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(manageTemplates()) ); button->hide(); @@ -200,16 +200,16 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro painter.end(); lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Mind map"), icon);*/ - m_templates->setMinimumHeight(topLayout->tqminimumSize().width() * 9 / 16); + m_templates->setMinimumHeight(topLayout->minimumSize().width() * 9 / 16); TQLabel *label = new TQLabel(m_templates, i18n("&Template:"), page); - tqlayout->addWidget(label, /*stretch=*/0, TQt::AlignBottom); - tqlayout->addStretch(); - tqlayout->addWidget(button, /*stretch=*/0, TQt::AlignBottom); - topLayout->addLayout(tqlayout); + layout->addWidget(label, /*stretch=*/0, TQt::AlignBottom); + layout->addStretch(); + layout->addWidget(button, /*stretch=*/0, TQt::AlignBottom); + topLayout->addLayout(layout); topLayout->addWidget(m_templates); - tqlayout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint()); + layout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint()); m_createIn = new TQComboBox(page); m_createIn->insertItem(i18n("(Baskets)")); label = new TQLabel(m_createIn, i18n("C&reate in:"), page); @@ -219,11 +219,11 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro "<li>Grouping baskets in folders for different projects;</li>" "<li>Making sections with sub-baskets representing chapters or pages;</li>" "<li>Making a group of baskets to export together (to eg. email them to people).</li></ul>"), page); - tqlayout->addWidget(label); - tqlayout->addWidget(m_createIn); - tqlayout->addWidget(helpLabel); - tqlayout->addStretch(); - topLayout->addLayout(tqlayout); + layout->addWidget(label); + layout->addWidget(m_createIn); + layout->addWidget(helpLabel); + layout->addStretch(); + topLayout->addLayout(layout); m_basketsMap.clear(); m_basketsMap.insert(/*index=*/0, /*basket=*/0L); diff --git a/src/note.cpp b/src/note.cpp index 94eab87..13644eb 100644 --- a/src/note.cpp +++ b/src/note.cpp @@ -73,7 +73,7 @@ Note::Note(Basket *parent) m_x(0), m_y(-1), m_width(-1), m_height(-1), m_groupWidth(250), m_isFolded(false), m_firstChild(0L), m_parentNote(0), - m_basket(parent), m_content(0), m_addedDate(TQDateTime::tqcurrentDateTime()), m_lastModificationDate(TQDateTime::tqcurrentDateTime()), + m_basket(parent), m_content(0), m_addedDate(TQDateTime::currentDateTime()), m_lastModificationDate(TQDateTime::currentDateTime()), m_computedAreas(false), m_onTop(false), m_deltaX(0), m_deltaY(0), m_deltaHeight(0), m_collapseFinished(true), m_expandingFinished(true), m_hovered(false), m_hoveredZone(Note::None), m_focused(false), m_selected(false), m_wasInLastSelectionRect(false), @@ -853,20 +853,20 @@ void Note::unsetWidth() child->unsetWidth(); } -void Note::requestRetqlayout() +void Note::requestRelayout() { m_width = 0; unbufferize(); - basket()->relayoutNotes(true); // TODO: A signal that will retqlayout ONCE and DELAYED if called several times + basket()->relayoutNotes(true); // TODO: A signal that will relayout ONCE and DELAYED if called several times } void Note::setWidth(int width) // TODO: inline ? { if (m_width != width) - setWidthForceRetqlayout(width); + setWidthForceRelayout(width); } -void Note::setWidthForceRetqlayout(int width) +void Note::setWidthForceRelayout(int width) { unbufferize(); m_width = (width < minWidth() ? minWidth() : width); @@ -970,7 +970,7 @@ void Note::toggleFolded(bool animate) if (animate) { // We animate collapsing (so sub-notes fluidly go under the first note) - // We don't animate expanding: we place sub-notes directly under the first note (and the next retqlayout will animate the expanding) + // We don't animate expanding: we place sub-notes directly under the first note (and the next relayout will animate the expanding) // But if user quickly collapsed and then expand (while the collapsing animation isn't finished), we animate anyway bool animateSetUnder = (m_isFolded || !m_collapseFinished); // std::cout << "fold:" << m_isFolded << " collapseFinished:" << m_collapseFinished << " animateSetUnder:" << animateSetUnder << std::endl; @@ -1098,7 +1098,7 @@ void Note::relayoutAt(int x, int y, bool animate) m_computedAreas = false; m_areas.clear(); - // Don't retqlayout free notes one under the other, because by definition they are freely positionned! + // Don't relayout free notes one under the other, because by definition they are freely positionned! if (isFree()) { x = finalX(); y = finalY(); @@ -1109,7 +1109,7 @@ void Note::relayoutAt(int x, int y, bool animate) cancelAnimation(); setX(x); setY(y); - // But retqlayout others vertically if they are inside such primary groups or if it is a "normal" basket: + // But relayout others vertically if they are inside such primary groups or if it is a "normal" basket: } else { if (animate) setFinalPosition(x, y); @@ -1120,13 +1120,13 @@ void Note::relayoutAt(int x, int y, bool animate) } } - // Then, retqlayout sub-notes (only the first, if the group is folded) and so, assign an height to the group: + // Then, relayout sub-notes (only the first, if the group is folded) and so, assign an height to the group: if (isGroup()) { int h = 0; Note *child = firstChild(); bool first = true; while (child) { - if (child->matching() && (!m_isFolded || first || basket()->isFiltering())) { // Don't use showSubNotes() but use !m_isFolded because we don't want a retqlayout for the animated collapsing notes + if (child->matching() && (!m_isFolded || first || basket()->isFiltering())) { // Don't use showSubNotes() but use !m_isFolded because we don't want a relayout for the animated collapsing notes child->relayoutAt(x + width(), y+h, animate); h += child->finalHeight(); } else // In case the user collapse a group, then move it and then expand it: @@ -1284,7 +1284,7 @@ void Note::drawExpander(TQPainter *painter, int x, int y, const TQColor &backgro // If the current style is a KStyle, use it to draw the expander (plus or minus): if (dynamic_cast<KStyle*>(&(kapp->tqstyle())) != NULL) { // Set the 4 rounded corners background to background color: - TQColorGroup cg(basket->tqcolorGroup()); + TQColorGroup cg(basket->colorGroup()); cg.setColor(TQColorGroup::Base, background); // Fill the inside of the expander in white, typically: @@ -1304,7 +1304,7 @@ void Note::drawExpander(TQPainter *painter, int x, int y, const TQColor &backgro } else { int width = EXPANDER_WIDTH; int height = EXPANDER_HEIGHT; - const TQColorGroup &cg = basket->tqcolorGroup(); + const TQColorGroup &cg = basket->colorGroup(); // Fill white area: painter->fillRect(x + 1, y + 1, width - 2, height - 2, cg.base()); @@ -1979,7 +1979,7 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect) } // Determine the colors (for the richText drawing) and the text color (for the tags arrow too): - TQColorGroup cg(basket()->tqcolorGroup()); + TQColorGroup cg(basket()->colorGroup()); cg.setColor(TQColorGroup::Text, (m_computedState.textColor().isValid() ? m_computedState.textColor() : basket()->textColor()) ); cg.setColor(TQColorGroup::Background, bgColor); if (isSelected()) @@ -1990,14 +1990,14 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect) TQColor textColor = cg.color(TQColorGroup::Text); TQColor light = Tools::mixColor(textColor, bgColor); TQColor mid = Tools::mixColor(textColor, light); - painter2.setPen(light);//TQPen(basket()->tqcolorGroup().dark().light(150))); + painter2.setPen(light);//TQPen(basket()->colorGroup().dark().light(150))); painter2.drawLine(xIcon, yIcon + 6, xIcon + 4, yIcon + 6); - painter2.setPen(mid);//TQPen(basket()->tqcolorGroup().dark())); + painter2.setPen(mid);//TQPen(basket()->colorGroup().dark())); painter2.drawLine(xIcon + 1, yIcon + 7, xIcon + 3, yIcon + 7); - painter2.setPen(textColor);//TQPen(basket()->tqcolorGroup().foreground())); + painter2.setPen(textColor);//TQPen(basket()->colorGroup().foreground())); painter2.drawPoint(xIcon + 2, yIcon + 8); } else if (m_haveInvisibleTags) { - painter2.setPen(cg.color(TQColorGroup::Text)/*TQPen(basket()->tqcolorGroup().foreground())*/); + painter2.setPen(cg.color(TQColorGroup::Text)/*TQPen(basket()->colorGroup().foreground())*/); painter2.drawPoint(xIcon, yIcon + 7); painter2.drawPoint(xIcon + 2, yIcon + 7); painter2.drawPoint(xIcon + 4, yIcon + 7); @@ -2146,7 +2146,7 @@ void Note::recomputeStyle() // unsetWidth(); if (content()) content()->fontChanged(); -// requestRetqlayout(); // TODO! +// requestRelayout(); // TODO! } void Note::recomputeAllStyles() @@ -74,7 +74,7 @@ class Note // int m_minContentWidth; public: void setWidth(int width); - void setWidthForceRetqlayout(int width); + void setWidthForceRelayout(int width); void setInitialHeight(int height) { m_height = height; } /// << Do NEVER use it unless you know what you do! void setX(int x); void setY(int y); @@ -93,7 +93,7 @@ class Note int minWidth(); int minRight(); void unsetWidth(); - void requestRetqlayout(); + void requestRelayout(); void setHeight(int height) { m_height = height; } /// << DO NEVER USE IT!!! Only available when moving notes, groups should be recreated with the exact same state as before! /// FREE AND COLUMN LAYOUTS MANAGEMENT: diff --git a/src/notecontent.cpp b/src/notecontent.cpp index 7dc7e17..24fbd6c 100644 --- a/src/notecontent.cpp +++ b/src/notecontent.cpp @@ -22,7 +22,7 @@ #include <tqdir.h> #include <tqdom.h> #include <tqpainter.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqfontmetrics.h> #include <tqwidget.h> #include <tqcursor.h> @@ -138,7 +138,7 @@ void NoteContent::contentChanged(int newMinWidth) m_minWidth = newMinWidth; if (note()) { // note()->unbufferize(); - note()->requestRetqlayout(); // TODO: It should re-set the width! m_width = 0 ? contentChanged: setWidth, geteight, if size havent changed, only tqrepaint and not retqlayout + note()->requestRelayout(); // TODO: It should re-set the width! m_width = 0 ? contentChanged: setWidth, geteight, if size havent changed, only repaint and not relayout } } @@ -152,7 +152,7 @@ Basket* NoteContent::basket() void NoteContent::setEdited() { - note()->setLastModificationDate(TQDateTime::tqcurrentDateTime()); + note()->setLastModificationDate(TQDateTime::currentDateTime()); basket()->save(); } @@ -210,7 +210,7 @@ TQString LinkContent::toText(const TQString &/*cuttedFullPath*/) else if (title().isEmpty()) return url().prettyURL(); else - return TQString("%1 <%2>").tqarg(title(), url().prettyURL()); + return TQString("%1 <%2>").arg(title(), url().prettyURL()); } TQString ColorContent::toText(const TQString &/*cuttedFullPath*/) { return color().name(); } TQString UnknownContent::toText(const TQString &/*cuttedFullPath*/) { return ""; } @@ -223,25 +223,25 @@ TQString HtmlContent::toHtml(const TQString &/*imageName*/, const TQString &/*cu { return Tools::htmlToParagraph(html()); } TQString ImageContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) -{ return TQString("<img src=\"%1\">").tqarg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); } +{ return TQString("<img src=\"%1\">").arg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); } TQString AnimationContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) -{ return TQString("<img src=\"%1\">").tqarg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); } +{ return TQString("<img src=\"%1\">").arg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); } TQString SoundContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) -{ return TQString("<a href=\"%1\">%2</a>").tqarg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon? +{ return TQString("<a href=\"%1\">%2</a>").arg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon? TQString FileContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) -{ return TQString("<a href=\"%1\">%2</a>").tqarg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon? +{ return TQString("<a href=\"%1\">%2</a>").arg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon? TQString LinkContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/) -{ return TQString("<a href=\"%1\">%2</a>").tqarg(url().prettyURL(), title()); } // With the icon? +{ return TQString("<a href=\"%1\">%2</a>").arg(url().prettyURL(), title()); } // With the icon? TQString LauncherContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) -{ return TQString("<a href=\"%1\">%2</a>").tqarg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), name()); } // With the icon? +{ return TQString("<a href=\"%1\">%2</a>").arg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), name()); } // With the icon? TQString ColorContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/) -{ return TQString("<span style=\"color: %1\">%2</span>").tqarg(color().name(), color().name()); } +{ return TQString("<span style=\"color: %1\">%2</span>").arg(color().name(), color().name()); } TQString UnknownContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/) { return ""; } @@ -378,14 +378,14 @@ TQPixmap HtmlContent::feedbackPixmap(int width, int height) { TQSimpleRichText richText(html(), note()->font()); richText.setWidth(width); - TQColorGroup tqcolorGroup(basket()->tqcolorGroup()); - tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor()); - tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); + TQColorGroup colorGroup(basket()->colorGroup()); + colorGroup.setColor(TQColorGroup::Text, note()->textColor()); + colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); TQPixmap pixmap( TQMIN(width, richText.widthUsed()), TQMIN(height, richText.height()) ); pixmap.fill(note()->backgroundColor().dark(FEEDBACK_DARKING)); TQPainter painter(&pixmap); painter.setPen(note()->textColor()); - richText.draw(&painter, 0, 0, TQRect(0, 0, pixmap.width(), pixmap.height()), tqcolorGroup); + richText.draw(&painter, 0, 0, TQRect(0, 0, pixmap.width(), pixmap.height()), colorGroup); painter.end(); return pixmap; } @@ -433,10 +433,10 @@ TQPixmap AnimationContent::feedbackPixmap(int width, int height) TQPixmap LinkContent::feedbackPixmap(int width, int height) { - TQColorGroup tqcolorGroup(basket()->tqcolorGroup()); - tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor()); - tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); - return m_linkDisplay.feedbackPixmap(width, height, tqcolorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor()); + TQColorGroup colorGroup(basket()->colorGroup()); + colorGroup.setColor(TQColorGroup::Text, note()->textColor()); + colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); + return m_linkDisplay.feedbackPixmap(width, height, colorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor()); } TQPixmap ColorContent::feedbackPixmap(int width, int height) @@ -446,45 +446,45 @@ TQPixmap ColorContent::feedbackPixmap(int width, int height) int rectHeight = (textRect.height() + 2)*3/2; int rectWidth = rectHeight * 14 / 10; // 1.4 times the height, like A4 papers. - TQColorGroup tqcolorGroup(basket()->tqcolorGroup()); - tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor()); - tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); + TQColorGroup colorGroup(basket()->colorGroup()); + colorGroup.setColor(TQColorGroup::Text, note()->textColor()); + colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); TQPixmap pixmap( TQMIN(width, rectWidth + RECT_MARGIN + textRect.width() + RECT_MARGIN), TQMIN(height, rectHeight) ); pixmap.fill(note()->backgroundColor().dark(FEEDBACK_DARKING)); TQPainter painter(&pixmap); - paint(&painter, pixmap.width(), pixmap.height(), tqcolorGroup, false, false, false); // We don't care of the three last boolean parameters. + paint(&painter, pixmap.width(), pixmap.height(), colorGroup, false, false, false); // We don't care of the three last boolean parameters. painter.end(); return pixmap; } TQPixmap FileContent::feedbackPixmap(int width, int height) { - TQColorGroup tqcolorGroup(basket()->tqcolorGroup()); - tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor()); - tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); - return m_linkDisplay.feedbackPixmap(width, height, tqcolorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor()); + TQColorGroup colorGroup(basket()->colorGroup()); + colorGroup.setColor(TQColorGroup::Text, note()->textColor()); + colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); + return m_linkDisplay.feedbackPixmap(width, height, colorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor()); } TQPixmap LauncherContent::feedbackPixmap(int width, int height) { - TQColorGroup tqcolorGroup(basket()->tqcolorGroup()); - tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor()); - tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); - return m_linkDisplay.feedbackPixmap(width, height, tqcolorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor()); + TQColorGroup colorGroup(basket()->colorGroup()); + colorGroup.setColor(TQColorGroup::Text, note()->textColor()); + colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); + return m_linkDisplay.feedbackPixmap(width, height, colorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor()); } TQPixmap UnknownContent::feedbackPixmap(int width, int height) { TQRect textRect = TQFontMetrics(note()->font()).boundingRect(0, 0, /*width=*/1, 500000, TQt::AlignAuto | TQt::AlignTop | TQt::WordBreak, m_mimeTypes); - TQColorGroup tqcolorGroup(basket()->tqcolorGroup()); - tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor()); - tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); + TQColorGroup colorGroup(basket()->colorGroup()); + colorGroup.setColor(TQColorGroup::Text, note()->textColor()); + colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); TQPixmap pixmap( TQMIN(width, DECORATION_MARGIN + textRect.width() + DECORATION_MARGIN), TQMIN(height, DECORATION_MARGIN + textRect.height() + DECORATION_MARGIN) ); TQPainter painter(&pixmap); - paint(&painter, pixmap.width() + 1, pixmap.height(), tqcolorGroup, false, false, false); // We don't care of the three last boolean parameters. + paint(&painter, pixmap.width() + 1, pixmap.height(), colorGroup, false, false, false); // We don't care of the three last boolean parameters. painter.setPen(note()->backgroundColor().dark(FEEDBACK_DARKING)); painter.drawPoint(0, 0); painter.drawPoint(pixmap.width() - 1, 0); @@ -520,11 +520,11 @@ int TextContent::setWidthAndGetHeight(int width) return 10; // Lazy loaded } -void TextContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) +void TextContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) { if (m_simpleRichText) { width -= 1; - m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), tqcolorGroup); + m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), colorGroup); } } @@ -629,11 +629,11 @@ int HtmlContent::setWidthAndGetHeight(int width) return 10; // Lazy loaded } -void HtmlContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) +void HtmlContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) { if (m_simpleRichText) { width -= 1; - m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), tqcolorGroup); + m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), colorGroup); } } @@ -735,7 +735,7 @@ int ImageContent::setWidthAndGetHeight(int width) } } -void ImageContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*tqcolorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) +void ImageContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*colorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) { width -= 1; // KPixmap pixmap = m_pixmap; @@ -804,7 +804,7 @@ bool ImageContent::saveToFile() void ImageContent::toolTipInfos(TQStringList *keys, TQStringList *values) { keys->append(i18n("Size")); - values->append(i18n("%1 by %2 pixels").tqarg(TQString::number(m_pixmap.width()), TQString::number(m_pixmap.height()))); + values->append(i18n("%1 by %2 pixels").arg(TQString::number(m_pixmap.width()), TQString::number(m_pixmap.height()))); } TQString ImageContent::messageWhenOpenning(OpenMessage where) @@ -855,7 +855,7 @@ void ImageContent::exportToHTML(HTMLExporter *exporter, int /*indent*/) int AnimationContent::INVALID_STATUS = -100; AnimationContent::AnimationContent(Note *parent, const TQString &fileName, bool lazyLoad) - : NoteContent(parent, fileName), m_oldtqStatus(INVALID_STATUS) + : NoteContent(parent, fileName), m_oldStatus(INVALID_STATUS) { basket()->addWatchedFile(fullPath()); loadFromFile(lazyLoad); @@ -867,7 +867,7 @@ int AnimationContent::setWidthAndGetHeight(int /*width*/) return m_movie.framePixmap().height() ; // TODO!!! } -void AnimationContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*tqcolorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) +void AnimationContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*colorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) { /*width -= 1*/; // DEBUG_WIN << "AnimationContent::paint()"; @@ -929,7 +929,7 @@ bool AnimationContent::setMovie(const TQMovie &movie) m_movie = movie; m_movie.connectUpdate( this, TQT_SLOT(movieUpdated(const TQRect&)) ); m_movie.connectResize( this, TQT_SLOT(movieResized(const TQSize&)) ); - m_movie.connectStatus( this, TQT_SLOT(movietqStatus(int)) ); + m_movie.connectStatus( this, TQT_SLOT(movieStatus(int)) ); contentChanged( m_movie.framePixmap().width() + 1 ); // TODO return true; } @@ -942,7 +942,7 @@ void AnimationContent::movieUpdated(const TQRect&) void AnimationContent::movieResized(const TQSize&) { - note()->requestRetqlayout(); // ? + note()->requestRelayout(); // ? } /** When a user drop a .gif file, for instance, we don't know if it is an image @@ -953,21 +953,21 @@ void AnimationContent::movieResized(const TQSize&) * - For animation: TQMovie::EndOfFrame... (for each image), TQMovie::EndOfLoop, * and it then restart that for each loop. */ -void AnimationContent::movietqStatus(int status) +void AnimationContent::movieStatus(int status) { DEBUG_WIN << "movieStatus()"; // At least two frames: it's an animation, everything is OK - if (m_oldtqStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfFrame) { + if (m_oldStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfFrame) { movie().disconnectStatus(this); - m_oldtqStatus = INVALID_STATUS; + m_oldStatus = INVALID_STATUS; // if (note()->isFocused()) // When inserting a new note we ensure it visble // basket()->ensureNoteVisible(note()); // But after loading it has certainly grown and if it was } // Only one image: it's an image, change note's type - else if (m_oldtqStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfLoop) { + else if (m_oldStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfLoop) { movie().disconnectStatus(this); - m_oldtqStatus = INVALID_STATUS; + m_oldStatus = INVALID_STATUS; note()->setContent(new ImageContent(note(), fileName())); basket()->save(); //delete this; // CRASH, as always !!!!!!!!! @@ -977,13 +977,13 @@ void AnimationContent::movietqStatus(int status) // TQTimer::singleShot(25, note(), TQT_SLOT(delayedEnsureVisible())); } else - m_oldtqStatus = status; + m_oldStatus = status; } void AnimationContent::exportToHTML(HTMLExporter *exporter, int /*indent*/) { exporter->stream << TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">") - .tqarg( exporter->dataFolderName + exporter->copyFile(fullPath(), /*createIt=*/true), + .arg( exporter->dataFolderName + exporter->copyFile(fullPath(), /*createIt=*/true), TQString::number(movie().framePixmap().size().width()), TQString::number(movie().framePixmap().size().height()) ); } @@ -1004,9 +1004,9 @@ int FileContent::setWidthAndGetHeight(int width) return m_linkDisplay.height(); } -void FileContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered) +void FileContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered) { - m_linkDisplay.paint(painter, 0, 0, width, height, tqcolorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0); + m_linkDisplay.paint(painter, 0, 0, width, height, colorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0); } bool FileContent::loadFromFile(bool /*lazyLoad*/) @@ -1221,9 +1221,9 @@ int LinkContent::setWidthAndGetHeight(int width) return m_linkDisplay.height(); } -void LinkContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered) +void LinkContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered) { - m_linkDisplay.paint(painter, 0, 0, width, height, tqcolorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0); + m_linkDisplay.paint(painter, 0, 0, width, height, colorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0); } void LinkContent::saveToNode(TQDomDocument &doc, TQDomElement &content) @@ -1407,9 +1407,9 @@ int LauncherContent::setWidthAndGetHeight(int width) return m_linkDisplay.height(); } -void LauncherContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered) +void LauncherContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered) { - m_linkDisplay.paint(painter, 0, 0, width, height, tqcolorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0); + m_linkDisplay.paint(painter, 0, 0, width, height, colorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0); } bool LauncherContent::loadFromFile(bool /*lazyLoad*/) // TODO: saveToFile() ?? Is it possible? @@ -1427,7 +1427,7 @@ void LauncherContent::toolTipInfos(TQStringList *keys, TQStringList *values) TQString exec = service.exec(); if (service.terminal()) - exec = i18n("%1 <i>(run in terminal)</i>").tqarg(exec); + exec = i18n("%1 <i>(run in terminal)</i>").arg(exec); if (!service.comment().isEmpty() && service.comment() != service.name()) { keys->append(i18n("Comment")); @@ -1527,7 +1527,7 @@ int ColorContent::setWidthAndGetHeight(int /*width*/) // We do not need width be return rectHeight; } -void ColorContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) +void ColorContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) { // FIXME: Duplicate from setColor(): TQRect textRect = TQFontMetrics(note()->font()).boundingRect(color().name()); @@ -1553,7 +1553,7 @@ void ColorContent::paint(TQPainter *painter, int width, int height, const TQColo // Draw the text: painter->setFont(note()->font()); - painter->setPen(tqcolorGroup.text()); + painter->setPen(colorGroup.text()); painter->drawText(rectWidth + RECT_MARGIN, 0, width - rectWidth - RECT_MARGIN, height, TQt::AlignAuto | TQt::AlignVCenter, color().name()); } @@ -1570,10 +1570,10 @@ void ColorContent::toolTipInfos(TQStringList *keys, TQStringList *values) m_color.getHsv(&hue, &saturation, &value); keys->append(i18n("RGB Colorspace: Red/Green/Blue", "RGB")); - values->append(i18n("<i>Red</i>: %1, <i>Green</i>: %2, <i>Blue</i>: %3,").tqarg(TQString::number(m_color.red()), TQString::number(m_color.green()), TQString::number(m_color.blue()))); + values->append(i18n("<i>Red</i>: %1, <i>Green</i>: %2, <i>Blue</i>: %3,").arg(TQString::number(m_color.red()), TQString::number(m_color.green()), TQString::number(m_color.blue()))); keys->append(i18n("HSV Colorspace: Hue/Saturation/Value", "HSV")); - values->append(i18n("<i>Hue</i>: %1, <i>Saturation</i>: %2, <i>Value</i>: %3,").tqarg(TQString::number(hue), TQString::number(saturation), TQString::number(value))); + values->append(i18n("<i>Hue</i>: %1, <i>Saturation</i>: %2, <i>Value</i>: %3,").arg(TQString::number(hue), TQString::number(saturation), TQString::number(value))); static TQString cssColors[] = { "aqua", "00ffff", @@ -1778,12 +1778,12 @@ void ColorContent::exportToHTML(HTMLExporter *exporter, int /*indent*/) int rectHeight = (textRect.height() + 2)*3/2; int rectWidth = rectHeight * 14 / 10; // 1.4 times the height, like A4 papers. - TQString fileName = /*Tools::fileNameForNewFile(*/TQString(TQString("color_%1.png").tqarg(color().name()).lower().mid(1))/*, exportData.iconsFolderPath)*/; + TQString fileName = /*Tools::fileNameForNewFile(*/TQString(TQString("color_%1.png").arg(color().name()).lower().mid(1))/*, exportData.iconsFolderPath)*/; TQString fullPath = exporter->iconsFolderPath + fileName; TQPixmap colorIcon = KColorCombo2::colorRectPixmap(color(), /*isDefault=*/false, rectWidth, rectHeight); colorIcon.save(fullPath, "PNG"); TQString iconHtml = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">") - .tqarg(exporter->iconsFolderName + fileName, TQString::number(colorIcon.width()), TQString::number(colorIcon.height())); + .arg(exporter->iconsFolderName + fileName, TQString::number(colorIcon.width()), TQString::number(colorIcon.height())); exporter->stream << iconHtml + " " + color().name(); } @@ -1814,29 +1814,29 @@ extern void drawGradient( TQPainter *p, const TQColor &colorTop, const TQColor & int x, int y, int w, int h, bool sunken, bool horz, bool flat ); /*const*/ -void UnknownContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) +void UnknownContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) { width -= 1; - painter->setPen(tqcolorGroup.text()); + painter->setPen(colorGroup.text()); // FIXME: Duplicate from ColorContent::paint() and CommonColorSelector::drawColorRect: // Fill with gradient: - drawGradient(painter, tqcolorGroup.background(), tqcolorGroup.background().dark(110), 1, 1, width - 2, height - 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false); + drawGradient(painter, colorGroup.background(), colorGroup.background().dark(110), 1, 1, width - 2, height - 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false); // Stroke: - TQColor stroke = Tools::mixColor(tqcolorGroup.background(), tqcolorGroup.text()); + TQColor stroke = Tools::mixColor(colorGroup.background(), colorGroup.text()); painter->setPen(stroke); painter->drawLine(1, 0, width - 2, 0); painter->drawLine(0, 1, 0, height - 2); painter->drawLine(1, height - 1, width - 2, height - 1); painter->drawLine(width - 1, 1, width - 1, height - 2); // Round corners: - painter->setPen(Tools::mixColor(tqcolorGroup.background(), stroke)); + painter->setPen(Tools::mixColor(colorGroup.background(), stroke)); painter->drawPoint(1, 1); painter->drawPoint(1, height - 2); painter->drawPoint(width - 2, height - 2); painter->drawPoint(width - 2, 1); - painter->setPen(tqcolorGroup.text()); + painter->setPen(colorGroup.text()); painter->drawText(DECORATION_MARGIN, DECORATION_MARGIN, width - 2*DECORATION_MARGIN, height - 2*DECORATION_MARGIN, TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak, m_mimeTypes); } diff --git a/src/notecontent.h b/src/notecontent.h index 40bb1d9..52bd636 100644 --- a/src/notecontent.h +++ b/src/notecontent.h @@ -82,8 +82,8 @@ class NoteContent // TODO: Mark some methods as const! and some (lik // Complexe Abstract Generic Methods: virtual void exportToHTML(HTMLExporter *exporter, int indent) = 0; /// << Export the note in an HTML file. virtual TQString cssClass() = 0; /// << @return the CSS class of the note when exported to HTML - virtual int setWidthAndGetHeight(int width) = 0; /// << Retqlayout content with @p width (never less than minWidth()). @return its new height. - virtual void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered) = 0; /// << Paint the content on @p painter, at coordinate (0, 0) and with the size (@p width, @p height). + virtual int setWidthAndGetHeight(int width) = 0; /// << Relayout content with @p width (never less than minWidth()). @return its new height. + virtual void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered) = 0; /// << Paint the content on @p painter, at coordinate (0, 0) and with the size (@p width, @p height). virtual bool loadFromFile(bool /*lazyLoad*/) { return false; } /// << Load the content from the file. The default implementation does nothing. @see fileName(). virtual bool finishLazyLoad() { return false; } /// << Load what was not loaded by loadFromFile() if it was lazy-loaded virtual bool saveToFile() { return false; } /// << Save the content to the file. The default implementation does nothing. @see fileName(). @@ -131,7 +131,7 @@ class NoteContent // TODO: Mark some methods as const! and some (lik public: void setEdited(); /// << Mark the note as edited NOW: change the "last modification time and time" AND save the basket to XML file. protected: - void contentChanged(int newMinWidth); /// << When the content has changed, inherited classes should call this to specify its new minimum size and trigger a basket retqlayout. + void contentChanged(int newMinWidth); /// << When the content has changed, inherited classes should call this to specify its new minimum size and trigger a basket relayout. private: Note *m_note; TQString m_fileName; @@ -163,7 +163,7 @@ class TextContent : public NoteContent void exportToHTML(HTMLExporter *exporter, int indent); TQString cssClass(); int setWidthAndGetHeight(int width); - void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered); + void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); bool loadFromFile(bool lazyLoad); bool finishLazyLoad(); bool saveToFile(); @@ -176,7 +176,7 @@ class TextContent : public NoteContent TQString messageWhenOpenning(OpenMessage where); // TQString customOpenCommand(); // Content-Specific Methods: - void setText(const TQString &text, bool lazyLoad = false); /// << Change the text note-content and retqlayout the note. + void setText(const TQString &text, bool lazyLoad = false); /// << Change the text note-content and relayout the note. TQString text() { return m_text; } /// << @return the text note-content. protected: TQString m_text; @@ -206,7 +206,7 @@ class HtmlContent : public NoteContent void exportToHTML(HTMLExporter *exporter, int indent); TQString cssClass(); int setWidthAndGetHeight(int width); - void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered); + void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); bool loadFromFile(bool lazyLoad); bool finishLazyLoad(); bool saveToFile(); @@ -219,7 +219,7 @@ class HtmlContent : public NoteContent TQString messageWhenOpenning(OpenMessage where); TQString customOpenCommand(); // Content-Specific Methods: - void setHtml(const TQString &html, bool lazyLoad = false); /// << Change the HTML note-content and retqlayout the note. + void setHtml(const TQString &html, bool lazyLoad = false); /// << Change the HTML note-content and relayout the note. TQString html() { return m_html; } /// << @return the HTML note-content. protected: TQString m_html; @@ -249,7 +249,7 @@ class ImageContent : public NoteContent void exportToHTML(HTMLExporter *exporter, int indent); TQString cssClass(); int setWidthAndGetHeight(int width); - void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered); + void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); bool loadFromFile(bool lazyLoad); bool finishLazyLoad(); bool saveToFile(); @@ -263,7 +263,7 @@ class ImageContent : public NoteContent TQString messageWhenOpenning(OpenMessage where); TQString customOpenCommand(); // Content-Specific Methods: - void setPixmap(const TQPixmap &pixmap); /// << Change the pixmap note-content and retqlayout the note. + void setPixmap(const TQPixmap &pixmap); /// << Change the pixmap note-content and relayout the note. TQPixmap pixmap() { return m_pixmap; } /// << @return the pixmap note-content. protected: TQPixmap m_pixmap; @@ -299,7 +299,7 @@ class AnimationContent : public TQObject, public NoteContent // TQObject to be a void exportToHTML(HTMLExporter *exporter, int indent); TQString cssClass(); int setWidthAndGetHeight(int width); - void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered); + void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); bool loadFromFile(bool lazyLoad); bool finishLazyLoad(); bool saveToFile(); @@ -307,15 +307,15 @@ class AnimationContent : public TQObject, public NoteContent // TQObject to be a TQString messageWhenOpenning(OpenMessage where); TQString customOpenCommand(); // Content-Specific Methods: - bool setMovie(const TQMovie &movie); /// << Change the movie note-content and retqlayout the note. + bool setMovie(const TQMovie &movie); /// << Change the movie note-content and relayout the note. TQMovie movie() { return m_movie; } /// << @return the movie note-content. protected slots: void movieUpdated(const TQRect&); void movieResized(const TQSize&); - void movietqStatus(int status); + void movieStatus(int status); protected: TQMovie m_movie; - int m_oldtqStatus; + int m_oldStatus; static int INVALID_STATUS; }; @@ -342,7 +342,7 @@ class FileContent : public TQObject, public NoteContent void exportToHTML(HTMLExporter *exporter, int indent); TQString cssClass(); int setWidthAndGetHeight(int width); - void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered); + void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); bool loadFromFile(bool /*lazyLoad*/); void fontChanged(); void linkLookChanged(); @@ -360,7 +360,7 @@ class FileContent : public TQObject, public NoteContent // Open Content or File: TQString messageWhenOpenning(OpenMessage where); // Content-Specific Methods: - void setFileName(const TQString &fileName); /// << Reimplemented to be able to retqlayout the note. + void setFileName(const TQString &fileName); /// << Reimplemented to be able to relayout the note. virtual LinkLook* linkLook() { return LinkLook::fileLook; } protected: LinkDisplay m_linkDisplay; @@ -430,7 +430,7 @@ class LinkContent : public TQObject, public NoteContent void exportToHTML(HTMLExporter *exporter, int indent); TQString cssClass(); int setWidthAndGetHeight(int width); - void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered); + void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void saveToNode(TQDomDocument &doc, TQDomElement &content); void fontChanged(); void linkLookChanged(); @@ -449,7 +449,7 @@ class LinkContent : public TQObject, public NoteContent KURL urlToOpen(bool /*with*/); TQString messageWhenOpenning(OpenMessage where); // Content-Specific Methods: - void setLink(const KURL &url, const TQString &title, const TQString &icon, bool autoTitle, bool autoIcon); /// << Change the link and retqlayout the note. + void setLink(const KURL &url, const TQString &title, const TQString &icon, bool autoTitle, bool autoIcon); /// << Change the link and relayout the note. KURL url() { return m_url; } /// << @return the URL of the link note-content. TQString title() { return m_title; } /// << @return the displayed title of the link note-content. TQString icon() { return m_icon; } /// << @return the displayed icon of the link note-content. @@ -493,7 +493,7 @@ class LauncherContent : public NoteContent void exportToHTML(HTMLExporter *exporter, int indent); TQString cssClass(); int setWidthAndGetHeight(int width); - void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered); + void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); bool loadFromFile(bool /*lazyLoad*/); void fontChanged(); TQString editToolTipText(); @@ -509,7 +509,7 @@ class LauncherContent : public NoteContent KURL urlToOpen(bool with); TQString messageWhenOpenning(OpenMessage where); // Content-Specific Methods: - void setLauncher(const TQString &name, const TQString &icon, const TQString &exec); /// << Change the launcher note-content and retqlayout the note. Normally called by loadFromFile (no save done). + void setLauncher(const TQString &name, const TQString &icon, const TQString &exec); /// << Change the launcher note-content and relayout the note. Normally called by loadFromFile (no save done). TQString name() { return m_name; } /// << @return the URL of the launcher note-content. TQString icon() { return m_icon; } /// << @return the displayed icon of the launcher note-content. TQString exec() { return m_exec; } /// << @return the execute command line of the launcher note-content. @@ -543,7 +543,7 @@ class ColorContent : public NoteContent void exportToHTML(HTMLExporter *exporter, int indent); TQString cssClass(); int setWidthAndGetHeight(int width); - void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered); + void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void saveToNode(TQDomDocument &doc, TQDomElement &content); void fontChanged(); TQString editToolTipText(); @@ -554,7 +554,7 @@ class ColorContent : public NoteContent bool needSpaceForFeedbackPixmap() { return true; } void addAlternateDragObjects(KMultipleDrag *dragObject); // Content-Specific Methods: - void setColor(const TQColor &color); /// << Change the color note-content and retqlayout the note. + void setColor(const TQColor &color); /// << Change the color note-content and relayout the note. TQColor color() { return m_color; } /// << @return the color note-content. protected: TQColor m_color; @@ -584,7 +584,7 @@ class UnknownContent : public NoteContent void exportToHTML(HTMLExporter *exporter, int indent); TQString cssClass(); int setWidthAndGetHeight(int width); - void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered); + void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); bool loadFromFile(bool /*lazyLoad*/); void fontChanged(); TQString editToolTipText(); diff --git a/src/notedrag.cpp b/src/notedrag.cpp index 5f00918..a7065ed 100644 --- a/src/notedrag.cpp +++ b/src/notedrag.cpp @@ -21,7 +21,7 @@ #include <tqdragobject.h> #include <tqdir.h> #include <tqpainter.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqbuffer.h> #include <kurldrag.h> #include <tdeversion.h> @@ -227,7 +227,7 @@ void NoteDrag::serializeLinks(NoteSelection *noteList, KMultipleDrag *multipleDr multipleDrag->addDragObject(urlsDrag); #else KURLDrag2 *urlsDrag = new KURLDrag2(urls); - TQByteArray byteArray = urlsDrag->tqencodedData2("text/uri-list"); + TQByteArray byteArray = urlsDrag->encodedData2("text/uri-list"); TQStoredDrag *uriListDrag = new TQStoredDrag("text/uri-list"); uriListDrag->setEncodedData(byteArray); multipleDrag->addDragObject(uriListDrag); @@ -375,7 +375,7 @@ bool NoteDrag::canDecode(TQMimeSource *source) Basket* NoteDrag::basketOf(TQMimeSource *source) { - TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING)); + TQBuffer buffer(source->encodedData(NOTE_MIME_STRING)); if (buffer.open(IO_ReadOnly)) { TQDataStream stream(&buffer); // Get the parent basket: @@ -388,7 +388,7 @@ Basket* NoteDrag::basketOf(TQMimeSource *source) TQValueList<Note*> NoteDrag::notesOf(TQMimeSource *source) { - TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING)); + TQBuffer buffer(source->encodedData(NOTE_MIME_STRING)); if (buffer.open(IO_ReadOnly)) { TQDataStream stream(&buffer); // Get the parent basket: @@ -410,7 +410,7 @@ TQValueList<Note*> NoteDrag::notesOf(TQMimeSource *source) Note* NoteDrag::decode(TQMimeSource *source, Basket *parent, bool moveFiles, bool moveNotes) { - TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING)); + TQBuffer buffer(source->encodedData(NOTE_MIME_STRING)); if (buffer.open(IO_ReadOnly)) { TQDataStream stream(&buffer); // Get the parent basket: @@ -558,7 +558,7 @@ bool ExtendedTextDrag::decode(const TQMimeSource *e, TQString &str, TQCString &s // Test if it was a UTF-16 string (from eg. Mozilla): if (str.length() >= 2) { if ((str[0] == 0xFF && str[1] == 0xFE) || (str[0] == 0xFE && str[1] == 0xFF)) { - TQByteArray utf16 = e->tqencodedData(TQString("text/" + subtype).local8Bit()); + TQByteArray utf16 = e->encodedData(TQString("text/" + subtype).local8Bit()); str = TQTextCodec::codecForName("utf16")->toUnicode(utf16); return true; } @@ -567,22 +567,22 @@ bool ExtendedTextDrag::decode(const TQMimeSource *e, TQString &str, TQCString &s // Test if it was empty (sometimes, from GNOME or Mozilla) if (str.length() == 0 && subtype == "plain") { if (e->provides("UTF8_STRING")) { - TQByteArray utf8 = e->tqencodedData("UTF8_STRING"); + TQByteArray utf8 = e->encodedData("UTF8_STRING"); str = TQTextCodec::codecForName("utf8")->toUnicode(utf8); return true; } - if (e->provides("text/tqunicode")) { // FIXME: It's UTF-16 without order bytes!!! - TQByteArray utf16 = e->tqencodedData("text/tqunicode"); + if (e->provides("text/unicode")) { // FIXME: It's UTF-16 without order bytes!!! + TQByteArray utf16 = e->encodedData("text/unicode"); str = TQTextCodec::codecForName("utf16")->toUnicode(utf16); return true; } if (e->provides("TEXT")) { // local encoding - TQByteArray text = e->tqencodedData("TEXT"); + TQByteArray text = e->encodedData("TEXT"); str = TQString(text); return true; } if (e->provides("COMPOUND_TEXT")) { // local encoding - TQByteArray text = e->tqencodedData("COMPOUND_TEXT"); + TQByteArray text = e->encodedData("COMPOUND_TEXT"); str = TQString(text); return true; } diff --git a/src/notedrag.h b/src/notedrag.h index eeff237..804d05d 100644 --- a/src/notedrag.h +++ b/src/notedrag.h @@ -87,7 +87,7 @@ class ExtendedTextDrag : public TQTextDrag static bool decode(const TQMimeSource *e, TQString &str, TQCString &subtype); }; -// Support KDE 3.3 and older PROTECTED KURLDrag::tqencodedData()! +// Support KDE 3.3 and older PROTECTED KURLDrag::encodedData()! #include <kurldrag.h> class KURLDrag2 : public KURLDrag @@ -96,9 +96,9 @@ class KURLDrag2 : public KURLDrag TQ_OBJECT public: KURLDrag2(const KURL::List &urls) : KURLDrag(urls) {} - TQByteArray tqencodedData2(const char *mime) const + TQByteArray encodedData2(const char *mime) const { - return tqencodedData(mime); + return encodedData(mime); } }; diff --git a/src/noteedit.cpp b/src/noteedit.cpp index e47933a..0ad5dcf 100644 --- a/src/noteedit.cpp +++ b/src/noteedit.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <klineedit.h> #include <kurlrequester.h> @@ -279,7 +279,7 @@ void HtmlEditor::cursorPositionChanged() InlineEditors::instance()->richTextItalic->setChecked( textEdit()->italic() ); InlineEditors::instance()->richTextUnderline->setChecked( textEdit()->underline() ); - switch (textEdit()->tqalignment()) { + switch (textEdit()->alignment()) { default: case 1/*TQt::AlignLeft*/: InlineEditors::instance()->richTextLeft->setChecked(true); break; case 4/*TQt::AlignCenter*/: InlineEditors::instance()->richTextCenter->setChecked(true); break; @@ -337,10 +337,10 @@ void HtmlEditor::fontChanged(const TQFont &font) //void HtmlEditor::setBold() { textEdit()->setBold( InlineEditors::instance()->richTextBold->isChecked() ); } //void HtmlEditor::setItalic() { textEdit()->setItalic( InlineEditors::instance()->richTextItalic->isChecked() ); } //void HtmlEditor::setUnderline() { textEdit()->setUnderline( InlineEditors::instance()->richTextUnderline->isChecked() ); } -void HtmlEditor::setLeft() { textEdit()->tqsetAlignment(TQt::AlignLeft); } -void HtmlEditor::setCentered() { textEdit()->tqsetAlignment(TQt::AlignCenter); } -void HtmlEditor::setRight() { textEdit()->tqsetAlignment(TQt::AlignRight); } -void HtmlEditor::setBlock() { textEdit()->tqsetAlignment(TQt::AlignJustify); } +void HtmlEditor::setLeft() { textEdit()->setAlignment(TQt::AlignLeft); } +void HtmlEditor::setCentered() { textEdit()->setAlignment(TQt::AlignCenter); } +void HtmlEditor::setRight() { textEdit()->setAlignment(TQt::AlignRight); } +void HtmlEditor::setBlock() { textEdit()->setAlignment(TQt::AlignJustify); } HtmlEditor::~HtmlEditor() { @@ -536,7 +536,7 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK m_noteContent(contentNote) { TQWidget *page = plainPage(); - TQGridLayout *tqlayout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); + TQGridLayout *layout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); m_url = new KURLRequester(m_noteContent->url().url(), page); @@ -559,12 +559,12 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK m_autoIcon = new TQPushButton(i18n("Auto"), wid); // Create before to know size here: /* Icon button: */ m_icon->setIcon(m_noteContent->icon()); - int minSize = m_autoIcon->tqsizeHint().height(); - // Make the icon button at least the same heigh than the other buttons for a better tqalignment (nicer to the eyes): - if (m_icon->tqsizeHint().height() < minSize) + int minSize = m_autoIcon->sizeHint().height(); + // Make the icon button at least the same heigh than the other buttons for a better alignment (nicer to the eyes): + if (m_icon->sizeHint().height() < minSize) m_icon->setFixedSize(minSize, minSize); else - m_icon->setFixedSize(m_icon->tqsizeHint().height(), m_icon->tqsizeHint().height()); // Make it square + m_icon->setFixedSize(m_icon->sizeHint().height(), m_icon->sizeHint().height()); // Make it square /* Auto button: */ m_autoIcon->setToggleButton(true); m_autoIcon->setOn(m_noteContent->autoIcon()); @@ -578,12 +578,12 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK //m_url->setShowLocalProtocol(true); TQLabel *label1 = new TQLabel(m_url, i18n("Ta&rget:"), page); TQLabel *label2 = new TQLabel(m_title, i18n("&Title:"), page); - tqlayout->addWidget(label1, 0, 0, TQt::AlignVCenter); - tqlayout->addWidget(label2, 1, 0, TQt::AlignVCenter); - tqlayout->addWidget(label3, 2, 0, TQt::AlignVCenter); - tqlayout->addWidget(m_url, 0, 1, TQt::AlignVCenter); - tqlayout->addWidget(wid1, 1, 1, TQt::AlignVCenter); - tqlayout->addWidget(wid, 2, 1, TQt::AlignVCenter); + layout->addWidget(label1, 0, 0, TQt::AlignVCenter); + layout->addWidget(label2, 1, 0, TQt::AlignVCenter); + layout->addWidget(label3, 2, 0, TQt::AlignVCenter); + layout->addWidget(m_url, 0, 1, TQt::AlignVCenter); + layout->addWidget(wid1, 1, 1, TQt::AlignVCenter); + layout->addWidget(wid, 2, 1, TQt::AlignVCenter); m_isAutoModified = false; connect( m_url, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(urlChanged(const TQString&)) ); @@ -593,8 +593,8 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK connect( m_autoIcon, TQT_SIGNAL(clicked()), this, TQT_SLOT(guessIcon()) ); TQWidget *stretchWidget = new TQWidget(page); - stretchWidget->tqsetSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space - tqlayout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); + stretchWidget->setSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space + layout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); urlChanged(""); @@ -674,15 +674,15 @@ void LinkEditDialog::slotOk() /* Change icon size if link look have changed */ LinkLook *linkLook = LinkLook::lookForURL(filteredURL); TQString icon = m_icon->icon(); // When we change size, icon isn't changed and keep it's old size - m_icon->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); // Reset size policy + m_icon->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); // Reset size policy m_icon->setIconSize(linkLook->iconSize()); // So I store it's name and reload it after size change ! m_icon->setIcon(icon); - int minSize = m_autoIcon->tqsizeHint().height(); - // Make the icon button at least the same heigh than the other buttons for a better tqalignment (nicer to the eyes): - if (m_icon->tqsizeHint().height() < minSize) + int minSize = m_autoIcon->sizeHint().height(); + // Make the icon button at least the same heigh than the other buttons for a better alignment (nicer to the eyes): + if (m_icon->sizeHint().height() < minSize) m_icon->setFixedSize(minSize, minSize); else - m_icon->setFixedSize(m_icon->tqsizeHint().height(), m_icon->tqsizeHint().height()); // Make it square + m_icon->setFixedSize(m_icon->sizeHint().height(), m_icon->sizeHint().height()); // Make it square KDialogBase::slotOk(); } @@ -695,7 +695,7 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p m_noteContent(contentNote) { TQWidget *page = plainPage(); - TQGridLayout *tqlayout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); + TQGridLayout *layout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); KService service(contentNote->fullPath()); @@ -711,12 +711,12 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p TQPushButton *guessButton = new TQPushButton(i18n("&Guess"), wid); /* Icon button: */ m_icon->setIcon(service.icon()); - int minSize = guessButton->tqsizeHint().height(); - // Make the icon button at least the same heigh than the other buttons for a better tqalignment (nicer to the eyes): - if (m_icon->tqsizeHint().height() < minSize) + int minSize = guessButton->sizeHint().height(); + // Make the icon button at least the same heigh than the other buttons for a better alignment (nicer to the eyes): + if (m_icon->sizeHint().height() < minSize) m_icon->setFixedSize(minSize, minSize); else - m_icon->setFixedSize(m_icon->tqsizeHint().height(), m_icon->tqsizeHint().height()); // Make it square + m_icon->setFixedSize(m_icon->sizeHint().height(), m_icon->sizeHint().height()); // Make it square /* Guess button: */ hLay->addWidget(m_icon); hLay->addWidget(guessButton); @@ -726,16 +726,16 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p TQLabel *label1 = new TQLabel(m_command->lineEdit(), i18n("Comman&d:"), page); TQLabel *label2 = new TQLabel(m_name, i18n("&Name:"), page); - tqlayout->addWidget(label1, 0, 0, TQt::AlignVCenter); - tqlayout->addWidget(label2, 1, 0, TQt::AlignVCenter); - tqlayout->addWidget(label, 2, 0, TQt::AlignVCenter); - tqlayout->addWidget(m_command, 0, 1, TQt::AlignVCenter); - tqlayout->addWidget(m_name, 1, 1, TQt::AlignVCenter); - tqlayout->addWidget(wid, 2, 1, TQt::AlignVCenter); + layout->addWidget(label1, 0, 0, TQt::AlignVCenter); + layout->addWidget(label2, 1, 0, TQt::AlignVCenter); + layout->addWidget(label, 2, 0, TQt::AlignVCenter); + layout->addWidget(m_command, 0, 1, TQt::AlignVCenter); + layout->addWidget(m_name, 1, 1, TQt::AlignVCenter); + layout->addWidget(wid, 2, 1, TQt::AlignVCenter); TQWidget *stretchWidget = new TQWidget(page); - stretchWidget->tqsetSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space - tqlayout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); + stretchWidget->setSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space + layout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); connect( guessButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(guessIcon()) ); } @@ -805,7 +805,7 @@ void InlineEditors::initToolBars(KActionCollection *actionCollection) // Init the RichTextEditor Toolbar: richTextFont = new FocusedFontCombo(Global::mainWindow()); - richTextFont->setFixedWidth(richTextFont->tqsizeHint().width() * 2 / 3); + richTextFont->setFixedWidth(richTextFont->sizeHint().width() * 2 / 3); richTextFont->setCurrentFont(defaultFont.family()); KWidgetAction *action = new KWidgetAction(richTextFont, i18n("Font"), TQt::Key_F6, /*receiver=*/0, /*slot=*/"", actionCollection, "richtext_font"); @@ -816,7 +816,7 @@ void InlineEditors::initToolBars(KActionCollection *actionCollection) /*receiver=*/0, /*slot=*/"", actionCollection, "richtext_font_size"); richTextColor = new FocusedColorCombo(Global::mainWindow()); - richTextColor->setFixedWidth(richTextColor->tqsizeHint().height() * 2); + richTextColor->setFixedWidth(richTextColor->sizeHint().height() * 2); richTextColor->setColor(textColor); action = new KWidgetAction(richTextColor, i18n("Color"), KShortcut(), 0, TQT_SLOT(), actionCollection, "richtext_color"); diff --git a/src/noteedit.h b/src/noteedit.h index d6fccda..009ac1e 100644 --- a/src/noteedit.h +++ b/src/noteedit.h @@ -22,7 +22,7 @@ #define NOTEEDIT_H #include <kdialogbase.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqlineedit.h> class TQWidget; diff --git a/src/notefactory.cpp b/src/notefactory.cpp index 1b8e83e..7e7e0d5 100644 --- a/src/notefactory.cpp +++ b/src/notefactory.cpp @@ -25,7 +25,7 @@ #include <tqregexp.h> #include <kcolordrag.h> #include <kurldrag.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqdir.h> #include <kmimetype.h> #include <kmessagebox.h> @@ -36,7 +36,7 @@ #include <tqfile.h> #include <kfilemetainfo.h> #include <kio/jobclasses.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <kopenwith.h> #include <kfiledialog.h> #include <kicondialog.h> @@ -264,7 +264,7 @@ TQString NoteFactory::createNoteLauncherFile(const TQString &command, const TQSt "Name=%2\n" "Icon=%3\n" "Encoding=UTF-8\n" - "Type=Application\n").tqarg(command, name, icon.isEmpty() ? TQString("exec") : icon); + "Type=Application\n").arg(command, name, icon.isEmpty() ? TQString("exec") : icon); TQString fileName = fileNameForNewNote(parent, "launcher.desktop"); TQString fullPath = parent->fullPathForFileName(fileName); // parent->dontCareOfCreation(fullPath); @@ -399,7 +399,7 @@ Note* NoteFactory::dropNote(TQMimeSource *source, Basket *parent, bool fromDrop, */ if (source->provides("text/x-moz-url")) { // FOR MOZILLA // Get the array and create a TQChar array of 1/2 of the size - TQByteArray mozilla = source->tqencodedData("text/x-moz-url"); + TQByteArray mozilla = source->encodedData("text/x-moz-url"); TQMemArray<TQChar> chars( mozilla.count() / 2 ); // A small debug work to know the value of each bytes if (Global::debugWindow) @@ -445,7 +445,7 @@ Note* NoteFactory::dropNote(TQMimeSource *source, Basket *parent, bool fromDrop, TQString message = i18n("<p>%1 doesn't support the data you've dropped.<br>" "It however created a generic note, allowing you to drag or copy it to an application that understand it.</p>" "<p>If you want the support of these data, please contact developer or visit the " - "<a href=\"http://basket.kde.org/dropdb.php\">BasKet Drop Database</a>.</p>").tqarg(kapp->aboutData()->programName()); + "<a href=\"http://basket.kde.org/dropdb.php\">BasKet Drop Database</a>.</p>").arg(kapp->aboutData()->programName()); KMessageBox::information(parent, message, i18n("Unsupported MIME Type(s)"), "unsupportedDropInfo", KMessageBox::AllowLink); return note; @@ -471,7 +471,7 @@ Note* NoteFactory::createNoteUnknown(TQMimeSource *source, Basket *parent/*, con // Echo the length (in bytes) and then the data, and then same for next MIME type: for (int i = 0; source->format(i); ++i) if ( *(source->format(i)) ) { - TQByteArray data = source->tqencodedData(source->format(i)); + TQByteArray data = source->encodedData(source->format(i)); stream << (TQ_UINT32)data.count(); stream.writeRawBytes(data.data(), data.count()); } @@ -682,7 +682,7 @@ Note* NoteFactory::copyFileAndLoad(const KURL &url, Basket *parent) if (Global::debugWindow) *Global::debugWindow << "copyFileAndLoad: " + url.prettyURL() + " to " + fullPath; -// TQString annotations = i18n("Original file: %1").tqarg(url.prettyURL()); +// TQString annotations = i18n("Original file: %1").arg(url.prettyURL()); // parent->dontCareOfCreation(fullPath); @@ -710,7 +710,7 @@ Note* NoteFactory::moveFileAndLoad(const KURL &url, Basket *parent) if (Global::debugWindow) *Global::debugWindow << "moveFileAndLoad: " + url.prettyURL() + " to " + fullPath; -// TQString annotations = i18n("Original file: %1").tqarg(url.prettyURL()); +// TQString annotations = i18n("Original file: %1").arg(url.prettyURL()); // parent->dontCareOfCreation(fullPath); @@ -779,7 +779,7 @@ NoteType::Id NoteFactory::typeForURL(const KURL &url, Basket */*parent*/) if (metaInfo.isEmpty()) { // metaInfo is empty for GIF files on my machine ! if (viewText && maybeText(url)) return NoteType::Text; else if (viewHTML && (maybeHtml(url))) return NoteType::Html; - else if (viewImage && maybeAnimation(url)) return NoteType::Animation; // See Note::movietqStatus(int) + else if (viewImage && maybeAnimation(url)) return NoteType::Animation; // See Note::movieStatus(int) else if (viewImage && maybeImageOrAnimation(url)) return NoteType::Image; // for more explanations else if (viewSound && maybeSound(url)) return NoteType::Sound; else if (maybeLauncher(url)) return NoteType::Launcher; diff --git a/src/password.cpp b/src/password.cpp index b7b3f12..9ae4284 100644 --- a/src/password.cpp +++ b/src/password.cpp @@ -22,7 +22,7 @@ #ifdef HAVE_LIBGPGME -#include <tqlayout.h> +#include <layout.h> #include <tqtoolbutton.h> #include <tqbuttongroup.h> #include <tqradiobutton.h> @@ -36,9 +36,9 @@ PasswordDlg::PasswordDlg(TQWidget *parent, const char *name) :KDialogBase(Plain, i18n("Password Protection"), Ok|Cancel, Ok, parent, name, /*modal=*/true, /*separator=*/true), w(0) { - TQHBoxLayout* toptqlayout = new TQHBoxLayout(plainPage(), 0, 0); + TQHBoxLayout* toplayout = new TQHBoxLayout(plainPage(), 0, 0); w = new Password(plainPage()); - toptqlayout->addWidget(w, 1); + toplayout->addWidget(w, 1); } PasswordDlg::~PasswordDlg() @@ -97,7 +97,7 @@ Password::Password(TQWidget *parent, const char *name) for(KGpgKeyList::iterator it = list.begin(); it != list.end(); ++it) { TQString name = gpg.checkForUtf8((*it).name); - keyCombo->insertItem(TQString("%1 <%2> %3").tqarg(name).tqarg((*it).email).tqarg((*it).id)); + keyCombo->insertItem(TQString("%1 <%2> %3").arg(name).arg((*it).email).arg((*it).id)); } publicPrivateRadioButton->setEnabled(keyCombo->count() > 0); keyCombo->setEnabled(keyCombo->count() > 0); diff --git a/src/passwordlayout.ui b/src/passwordlayout.ui index e04577f..d2c577c 100644 --- a/src/passwordlayout.ui +++ b/src/passwordlayout.ui @@ -60,7 +60,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout2</cstring> + <cstring>layout2</cstring> </property> <hbox> <property name="name"> @@ -104,7 +104,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>6</height> diff --git a/src/popupmenu.cpp b/src/popupmenu.cpp index 68085f3..403d475 100644 --- a/src/popupmenu.cpp +++ b/src/popupmenu.cpp @@ -43,7 +43,7 @@ void PopupMenu::execAtRectCenter(TQPopupMenu &menu, const TQRect &rect) { // Compute point where to popup the menu that should be centered : - TQSize menuSize = menu.tqsizeHint(); + TQSize menuSize = menu.sizeHint(); TQSize menuHalfSize = menuSize / 2; TQPoint point = rect.center() - TQPoint(menuHalfSize.width(), menuHalfSize.height()); @@ -66,7 +66,7 @@ void PopupMenu::execAtRectCenter(TQPopupMenu &menu, const TQRect &rect) void PopupMenu::execAtRectBottom(TQPopupMenu &menu, const TQRect &rect, bool centered) { - TQSize menuSize = menu.tqsizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)] + TQSize menuSize = menu.sizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)] int desktopWidth = kapp->desktop()->width(); // to be compared/added/substracted with TQRects/TQPoints... int desktopHeight = kapp->desktop()->height(); @@ -108,7 +108,7 @@ void PopupMenu::execAtRectBottom(TQPopupMenu &menu, const TQRect &rect, bool cen void PopupMenu::execAtRectRight(TQPopupMenu &menu, const TQRect &rect, bool centered) { - TQSize menuSize = menu.tqsizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)] + TQSize menuSize = menu.sizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)] int desktopWidth = kapp->desktop()->width(); // to be compared/added/substracted with TQRects/TQPoints... int desktopHeight = kapp->desktop()->height(); diff --git a/src/qeffects.cpp b/src/qeffects.cpp index 45ff01d..28fdb83 100644 --- a/src/qeffects.cpp +++ b/src/qeffects.cpp @@ -108,7 +108,7 @@ void TQAlphaWidget::run( int time ) widget->setWState( WState_Visible ); - move( widget->tqgeometry().x(),widget->tqgeometry().y() ); + move( widget->geometry().x(),widget->geometry().y() ); resize( widget->size().width(), widget->size().height() ); front = TQImage( widget->size(), 32 ); @@ -116,8 +116,8 @@ void TQAlphaWidget::run( int time ) back = TQImage( widget->size(), 32 ); back = TQPixmap::grabWindow( TQApplication::desktop()->winId(), - widget->tqgeometry().x(), widget->tqgeometry().y(), - widget->tqgeometry().width(), widget->tqgeometry().height() ); + widget->geometry().x(), widget->geometry().y(), + widget->geometry().width(), widget->geometry().height() ); if ( !back.isNull() && checkTime.elapsed() < duration / 2 ) { mixed = back.copy(); @@ -142,7 +142,7 @@ bool TQAlphaWidget::eventFilter( TQObject* o, TQEvent* e ) case TQEvent::Move: if ( o != widget ) break; - move( widget->tqgeometry().x(),widget->tqgeometry().y() ); + move( widget->geometry().x(),widget->geometry().y() ); update(); break; case TQEvent::Hide: @@ -251,7 +251,7 @@ void TQAlphaWidget::render() widget->clearWState( WState_ForceHide ); alphaBlend(); pm = mixed; - tqrepaint( FALSE ); + repaint( FALSE ); } } @@ -311,8 +311,8 @@ TQRollEffect::TQRollEffect( TQWidget* w, WFlags f, DirFlags orient ) totalWidth = widget->width(); totalHeight = widget->height(); } else { - totalWidth = widget->tqsizeHint().width(); - totalHeight = widget->tqsizeHint().height(); + totalWidth = widget->sizeHint().width(); + totalHeight = widget->sizeHint().height(); } currentHeight = totalHeight; @@ -348,7 +348,7 @@ bool TQRollEffect::eventFilter( TQObject* o, TQEvent* e ) case TQEvent::Move: if ( o != widget ) break; - move( widget->tqgeometry().x(),widget->tqgeometry().y() ); + move( widget->geometry().x(),widget->geometry().y() ); update(); break; case TQEvent::Hide: @@ -438,7 +438,7 @@ void TQRollEffect::run( int time ) widget->setWState( WState_Visible ); - move( widget->tqgeometry().x(),widget->tqgeometry().y() ); + move( widget->geometry().x(),widget->geometry().y() ); resize( TQMIN( currentWidth, totalWidth ), TQMIN( currentHeight, totalHeight ) ); show(); @@ -484,8 +484,8 @@ void TQRollEffect::scroll() int w = totalWidth; int h = totalHeight; - int x = widget->tqgeometry().x(); - int y = widget->tqgeometry().y(); + int x = widget->geometry().x(); + int y = widget->geometry().y(); if ( orientation & RightScroll || orientation & LeftScroll ) w = TQMIN( currentWidth, totalWidth ); @@ -494,15 +494,15 @@ void TQRollEffect::scroll() setUpdatesEnabled( FALSE ); if ( orientation & UpScroll ) - y = widget->tqgeometry().y() + TQMAX( 0, totalHeight - currentHeight ); + y = widget->geometry().y() + TQMAX( 0, totalHeight - currentHeight ); if ( orientation & LeftScroll ) - x = widget->tqgeometry().x() + TQMAX( 0, totalWidth - currentWidth ); + x = widget->geometry().x() + TQMAX( 0, totalWidth - currentWidth ); if ( orientation & UpScroll || orientation & LeftScroll ) move( x, y ); resize( w, h ); setUpdatesEnabled( TRUE ); - tqrepaint( FALSE ); + repaint( FALSE ); } if ( done ) { anim.stop(); diff --git a/src/regiongrabber.cpp b/src/regiongrabber.cpp index c13b9fa..9240218 100644 --- a/src/regiongrabber.cpp +++ b/src/regiongrabber.cpp @@ -23,7 +23,7 @@ #include <tqapplication.h> #include <tqpainter.h> -#include <tqpalette.h> +#include <palette.h> #include <tqstyle.h> #include <tqtimer.h> #include <tqtooltip.h> @@ -43,8 +43,8 @@ SizeTip::SizeTip( TQWidget *parent, const char *name ) void SizeTip::setTip( const TQRect &rect ) { - TQString tip = TQString( "%1x%2" ).tqarg( rect.width() ) - .tqarg( rect.height() ); + TQString tip = TQString( "%1x%2" ).arg( rect.width() ) + .arg( rect.height() ); setText( tip ); adjustSize(); @@ -54,7 +54,7 @@ void SizeTip::setTip( const TQRect &rect ) void SizeTip::positionTip( const TQRect &rect ) { - TQRect tipRect = tqgeometry(); + TQRect tipRect = geometry(); tipRect.moveTopLeft( TQPoint( 0, 0 ) ); if ( rect.intersects( tipRect ) ) @@ -63,7 +63,7 @@ void SizeTip::positionTip( const TQRect &rect ) tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) ); if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) ) - tipRect.moveBottomRight( tqgeometry().bottomRight() ); + tipRect.moveBottomRight( geometry().bottomRight() ); } move( tipRect.topLeft() ); @@ -94,7 +94,7 @@ void RegionGrabber::initGrabber() TQDesktopWidget desktopWidget; TQRect desktopSize; if ( desktopWidget.isVirtualDesktop() ) - desktopSize = desktopWidget.tqgeometry(); + desktopSize = desktopWidget.geometry(); else desktopSize = desktopWidget.screenGeometry( qt_xrootwin() ); @@ -171,8 +171,8 @@ void RegionGrabber::drawRubber() p.setPen( TQPen( color0, 1 ) ); p.setBrush( NoBrush ); - tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, tqcolorGroup(), - TQStyle::Style_Default, TQStyleOption( tqcolorGroup().base() ) ); + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, colorGroup(), + TQStyle::Style_Default, TQStyleOption( colorGroup().base() ) ); p.end(); } diff --git a/src/settings.cpp b/src/settings.cpp index ce25ef0..2353dbe 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include <config.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqhbox.h> #include <tqvbox.h> @@ -357,12 +357,12 @@ void Settings::setAutoBullet(bool yes) GeneralPage::GeneralPage(TQWidget * parent, const char * name) : KCModule(parent, name) { - TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQHBoxLayout *hLay; TQLabel *label; HelpLabel *hLabel; - TQGridLayout *gl = new TQGridLayout(tqlayout, /*nRows=*/3, /*nCols=*/3); + TQGridLayout *gl = new TQGridLayout(layout, /*nRows=*/3, /*nCols=*/3); gl->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding), 0, 2); // Basket Tree Position: @@ -394,16 +394,16 @@ GeneralPage::GeneralPage(TQWidget * parent, const char * name) "on that icon to paste the current selection.") + "</p>" + "<p>" + i18n("When doing so, %1 pops up a little balloon message to inform you the action has been successfully done. You can disable that balloon.") + "</p>" + "<p>" + i18n("Note that those messages are smart enough to not appear if the main window is visible. This is because you already see the result of your actions in the main window.") + "</p>") - .tqarg(kapp->aboutData()->programName()), + .arg(kapp->aboutData()->programName()), this); hLay->addWidget(m_usePassivePopup); hLay->addWidget(hLabel); hLay->addStretch(); - tqlayout->addLayout(hLay); + layout->addLayout(hLay); // System Tray Icon: TQGroupBox *gbSys = new TQGroupBox(3, Qt::Vertical, i18n("System Tray Icon"), this); - tqlayout->addWidget(gbSys); + layout->addWidget(gbSys); TQVBoxLayout *sysLay = new TQVBoxLayout(gbSys, /*margin=*/0, KDialogBase::spacingHint()); // Dock in System Tray: @@ -450,7 +450,7 @@ GeneralPage::GeneralPage(TQWidget * parent, const char * name) connect( m_useSystray, TQT_SIGNAL(toggled(bool)), m_systray, TQT_SLOT(setEnabled(bool)) ); - tqlayout->insertStretch(-1); + layout->insertStretch(-1); load(); } @@ -502,14 +502,14 @@ void GeneralPage::defaults() BasketsPage::BasketsPage(TQWidget * parent, const char * name) : KCModule(parent, name) { - TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQHBoxLayout *hLay; HelpLabel *hLabel; // Appearance: TQGroupBox *appearanceBox = new TQGroupBox(3, Qt::Vertical, i18n("Appearance"), this); - tqlayout->addWidget(appearanceBox); + layout->addWidget(appearanceBox); m_playAnimations = new TQCheckBox(i18n("Ani&mate changes in baskets"), appearanceBox); connect( m_playAnimations, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); @@ -523,7 +523,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name) // Behavior: TQGroupBox *behaviorBox = new TQGroupBox(5, Qt::Vertical, i18n("Behavior"), this); - tqlayout->addWidget(behaviorBox); + layout->addWidget(behaviorBox); m_autoBullet = new TQCheckBox(i18n("&Transform lines starting with * or - to lists in text editors"), behaviorBox); connect( m_autoBullet, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); @@ -566,7 +566,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name) hLayV->addWidget(m_groupOnInsertionLine); hLayV->addWidget(helpV); hLayV->insertStretch(-1); - tqlayout->addWidget(m_groupOnInsertionLineWidget); + layout->addWidget(m_groupOnInsertionLineWidget); connect(m_groupOnInsertionLine, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); widget = new TQWidget(behaviorBox); @@ -594,7 +594,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name) // Protection: TQGroupBox *protectionBox = new TQGroupBox(3, Qt::Vertical, i18n("Password Protection"), this); - tqlayout->addWidget(protectionBox); + layout->addWidget(protectionBox); widget = new TQWidget(protectionBox); // Re-Lock timeout configuration @@ -608,7 +608,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name) //label = new TQLabel(i18n("minutes"), this); //hLay->addWidget(label); hLay->addStretch(); -// tqlayout->addLayout(hLay); +// layout->addLayout(hLay); connect( m_enableReLockTimeoutMinutes, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); connect( m_reLockTimeoutMinutes, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()) ); connect( m_enableReLockTimeoutMinutes, TQT_SIGNAL(toggled(bool)), m_reLockTimeoutMinutes, TQT_SLOT(setEnabled(bool)) ); @@ -619,7 +619,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name) connect( m_useGnuPGAgent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); #endif - tqlayout->insertStretch(-1); + layout->insertStretch(-1); load(); } @@ -682,7 +682,7 @@ void BasketsPage::defaults() NewNotesPage::NewNotesPage(TQWidget * parent, const char * name) : KCModule(parent, name) { - TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQHBoxLayout *hLay; TQLabel *label; @@ -697,7 +697,7 @@ NewNotesPage::NewNotesPage(TQWidget * parent, const char * name) hLay->addWidget(label); hLay->addWidget(m_newNotesPlace); hLay->addStretch(); - //tqlayout->addLayout(hLay); + //layout->addLayout(hLay); label->hide(); m_newNotesPlace->hide(); connect( m_newNotesPlace, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()) ); @@ -726,7 +726,7 @@ NewNotesPage::NewNotesPage(TQWidget * parent, const char * name) m_pushVisualize = new TQPushButton(i18n("&Visualize..."), this); hLay->addWidget(m_pushVisualize); hLay->addStretch(); - tqlayout->addLayout(hLay); + layout->addLayout(hLay); connect( m_pushVisualize, TQT_SIGNAL(clicked()), this, TQT_SLOT(visualize()) ); // View File Content: @@ -736,13 +736,13 @@ NewNotesPage::NewNotesPage(TQWidget * parent, const char * name) m_viewHtmlFileContent = new TQCheckBox( i18n("&HTML page"), buttonGroup ); m_viewImageFileContent = new TQCheckBox( i18n("&Image or animation"), buttonGroup ); m_viewSoundFileContent = new TQCheckBox( i18n("&Sound"), buttonGroup ); - tqlayout->addWidget(buttonGroup); + layout->addWidget(buttonGroup); connect( m_viewTextFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); connect( m_viewHtmlFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); connect( m_viewImageFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); connect( m_viewSoundFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); - tqlayout->insertStretch(-1); + layout->insertStretch(-1); load(); } @@ -790,15 +790,15 @@ void NewNotesPage::visualize() NotesAppearancePage::NotesAppearancePage(TQWidget * parent, const char * name) : KCModule(parent, name) { - TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQTabWidget *tabs = new TQTabWidget(this); - tqlayout->addWidget(tabs); + layout->addWidget(tabs); m_soundLook = new LinkLookEditWidget(this, i18n("Conference audio record"), "sound", tabs); m_fileLook = new LinkLookEditWidget(this, i18n("Annual report"), "document", tabs); m_localLinkLook = new LinkLookEditWidget(this, i18n("Home folder"), "folder_home", tabs); m_networkLinkLook = new LinkLookEditWidget(this, "www.kde.org", KMimeType::iconForURL("http://www.kde.org"), tabs); - m_launcherLook = new LinkLookEditWidget(this, i18n("Launch %1").tqarg(kapp->aboutData()->programName()), "basket", tabs); + m_launcherLook = new LinkLookEditWidget(this, i18n("Launch %1").arg(kapp->aboutData()->programName()), "basket", tabs); tabs->addTab(m_soundLook, i18n("&Sounds") ); tabs->addTab(m_fileLook, i18n("&Files") ); tabs->addTab(m_localLinkLook, i18n("&Local Links") ); @@ -838,7 +838,7 @@ ApplicationsPage::ApplicationsPage(TQWidget * parent, const char * name) : KCModule(parent, name) { /* Applications page */ - TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); m_htmlUseProg = new TQCheckBox(i18n("Open &text notes with a custom application:"), this); m_htmlProg = new RunCommandRequester("", i18n("Open text notes with:"), this); @@ -890,16 +890,16 @@ ApplicationsPage::ApplicationsPage(TQWidget * parent, const char * name) TQWhatsThis::add(m_animationProg, whatsthis); TQWhatsThis::add(m_soundProg, whatsthis); - tqlayout->addWidget(m_htmlUseProg); - tqlayout->addItem(hLayH); - tqlayout->addWidget(m_imageUseProg); - tqlayout->addItem(hLayI); - tqlayout->addWidget(m_animationUseProg); - tqlayout->addItem(hLayA); - tqlayout->addWidget(m_soundUseProg); - tqlayout->addItem(hLayS); + layout->addWidget(m_htmlUseProg); + layout->addItem(hLayH); + layout->addWidget(m_imageUseProg); + layout->addItem(hLayI); + layout->addWidget(m_animationUseProg); + layout->addItem(hLayA); + layout->addWidget(m_soundUseProg); + layout->addItem(hLayS); - tqlayout->addSpacing(KDialogBase::spacingHint()); + layout->addSpacing(KDialogBase::spacingHint()); TQHBoxLayout *hLay = new TQHBoxLayout(0L, /*margin=*/0, /*spacing=*/0); HelpLabel *hl1 = new HelpLabel( @@ -918,7 +918,7 @@ ApplicationsPage::ApplicationsPage(TQWidget * parent, const char * name) this); hLay->addWidget(hl1); hLay->addStretch(); - tqlayout->addLayout(hLay); + layout->addLayout(hLay); hLay = new TQHBoxLayout(0L, /*margin=*/0, /*spacing=*/0); HelpLabel *hl2 = new HelpLabel( @@ -938,14 +938,14 @@ ApplicationsPage::ApplicationsPage(TQWidget * parent, const char * name) this); hLay->addWidget(hl2); hLay->addStretch(); - tqlayout->addLayout(hLay); + layout->addLayout(hLay); connect( m_htmlUseProg, TQT_SIGNAL(toggled(bool)), m_htmlProg, TQT_SLOT(setEnabled(bool)) ); connect( m_imageUseProg, TQT_SIGNAL(toggled(bool)), m_imageProg, TQT_SLOT(setEnabled(bool)) ); connect( m_animationUseProg, TQT_SIGNAL(toggled(bool)), m_animationProg, TQT_SLOT(setEnabled(bool)) ); connect( m_soundUseProg, TQT_SIGNAL(toggled(bool)), m_soundProg, TQT_SLOT(setEnabled(bool)) ); - tqlayout->insertStretch(-1); + layout->insertStretch(-1); load(); } diff --git a/src/softwareimporters.cpp b/src/softwareimporters.cpp index 24a20ed..2176907 100644 --- a/src/softwareimporters.cpp +++ b/src/softwareimporters.cpp @@ -24,11 +24,11 @@ #include <klocale.h> #include <kfiledialog.h> #include <tqptrstack.h> -#include <tqlayout.h> +#include <layout.h> #include <tqvbuttongroup.h> #include <tqradiobutton.h> #include <kmessagebox.h> -#include <tqtextedit.h> +#include <textedit.h> #include "softwareimporters.h" #include "basket.h" @@ -216,7 +216,7 @@ void SoftwareImporters::finishImport(Basket *basket) // Focus the FIRST note (the last inserted note is currently focused!): basket->setFocusedNote(basket->firstNoteShownInStack()); - // Retqlayout every notes at theire new place and simulate a load animation (because already loaded just after the creation). + // Relayout every notes at theire new place and simulate a load animation (because already loaded just after the creation). // Without a relayouting, notes on the bottom would comes from the top (because they were inserted on top) and clutter the animation load: basket->relayoutNotes(/*animate=*/false); basket->animateLoad(); @@ -491,7 +491,7 @@ void SoftwareImporters::importTextFile() ); // First create a basket for it: - TQString title = i18n("From TextFile.txt", "From %1").tqarg(KURL(fileName).fileName()); + TQString title = i18n("From TextFile.txt", "From %1").arg(KURL(fileName).fileName()); BasketFactory::newBasket(/*icon=*/"txt", title, /*backgroundImage=*/"", /*backgroundColor=*/TQColor(), /*textColor=*/TQColor(), /*templateName=*/"1column", /*createIn=*/0); Basket *basket = Global::bnpView->currentBasket(); basket->load(); diff --git a/src/systemtray.cpp b/src/systemtray.cpp index 7700f28..fdb7f40 100644 --- a/src/systemtray.cpp +++ b/src/systemtray.cpp @@ -121,7 +121,7 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu) // kapp->widgetAt(g + TQPoint(tw-1, 0)) != this || // kapp->widgetAt(g + TQPoint(0, th-1)) != this || // kapp->widgetAt(g + TQPoint(tw-1, th-1)) != this) { - int systrayManagerWinId = tqtopLevelWidget()->winId(); + int systrayManagerWinId = topLevelWidget()->winId(); KWin::forceActiveWindow(systrayManagerWinId); kapp->processEvents(); // Because without it the systrayManager is raised only after the messageBox is displayed // KWin::activateWindow(systrayManagerWinId); @@ -139,7 +139,7 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu) TQString message = i18n( "<p>Closing the main window will keep %1 running in the system tray. " "Use <b>Quit</b> from the <b>Basket</b> menu to quit the application.</p>" - ).tqarg(KGlobal::instance()->aboutData()->programName()); + ).arg(KGlobal::instance()->aboutData()->programName()); // We are sure the systray icon is visible: ouf! if (useSystray) { // Compute size and position of the pixmap to be grabbed: @@ -161,10 +161,10 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu) const int IMAGE_BORDER = 1; int ax = g.x() - x - CIRCLE_MARGINS - 1; int ay = g.y() - y - CIRCLE_MARGINS - 1; - painter.setPen( TQPen(KApplication::tqpalette().active().dark(), CIRCLE_WIDTH) ); + painter.setPen( TQPen(KApplication::palette().active().dark(), CIRCLE_WIDTH) ); painter.drawArc(ax + SHADOW_OFFSET, ay + SHADOW_OFFSET, tw + 2*CIRCLE_MARGINS, th + 2*CIRCLE_MARGINS, 0, 16*360); - painter.setPen( TQPen(TQt::red/*KApplication::tqpalette().active().highlight()*/, CIRCLE_WIDTH) ); + painter.setPen( TQPen(TQt::red/*KApplication::palette().active().highlight()*/, CIRCLE_WIDTH) ); painter.drawArc(ax, ay, tw + 2*CIRCLE_MARGINS, th + 2*CIRCLE_MARGINS, 0, 16*360); #if 1 // Draw the pixmap over the screenshot in case a window hide the icon: @@ -174,7 +174,7 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu) // Then, we add a border arround the image to make it more visible: TQPixmap finalShot(w + 2*IMAGE_BORDER, h + 2*IMAGE_BORDER); - finalShot.fill(KApplication::tqpalette().active().foreground()); + finalShot.fill(KApplication::palette().active().foreground()); painter.begin(&finalShot); painter.drawPixmap(IMAGE_BORDER, IMAGE_BORDER, shot); painter.end(); @@ -433,7 +433,7 @@ void SystemTray::updateToolTipDelayed() TQString tip = "<p><nobr>" + ( basket->isLocked() ? kapp->makeStdCaption(i18n("%1 (Locked)")) : kapp->makeStdCaption( "%1") ) - .tqarg(Tools::textToHTMLWithoutP(basket->basketName())); + .arg(Tools::textToHTMLWithoutP(basket->basketName())); TQToolTip::add(this, tip); } diff --git a/src/tag.cpp b/src/tag.cpp index f560397..700b88e 100644 --- a/src/tag.cpp +++ b/src/tag.cpp @@ -77,7 +77,7 @@ TQString State::fullName() { if (!parentTag() || parentTag()->states().count() == 1) return (name().isEmpty() && parentTag() ? parentTag()->name() : name()); - return TQString(i18n("%1: %2")).tqarg(parentTag()->name(), name()); + return TQString(i18n("%1: %2")).arg(parentTag()->name(), name()); } TQFont State::font(TQFont base) @@ -541,9 +541,9 @@ void Tag::createDefaultTagsSet(const TQString &fullPath) " </state>\n" " </tag>\n" "\n") - .tqarg( i18n("To Do"), i18n("Unchecked"), i18n("Done") ) // %1 %2 %3 - .tqarg( i18n("Progress"), i18n("0 %"), i18n("25 %") ) // %4 %5 %6 - .tqarg( i18n("50 %"), i18n("75 %"), i18n("100 %") ) // %7 %8 %9 + .arg( i18n("To Do"), i18n("Unchecked"), i18n("Done") ) // %1 %2 %3 + .arg( i18n("Progress"), i18n("0 %"), i18n("25 %") ) // %4 %5 %6 + .arg( i18n("50 %"), i18n("75 %"), i18n("100 %") ) // %7 %8 %9 + TQString( " <tag>\n" " <name>%1</name>\n" // "Priority" @@ -596,9 +596,9 @@ void Tag::createDefaultTagsSet(const TQString &fullPath) " </state>\n" " </tag>\n" "\n") - .tqarg( i18n("Priority"), i18n("Low"), i18n("Medium") ) // %1 %2 %3 - .tqarg( i18n("High"), i18n("Preference"), i18n("Bad") ) // %4 %5 %6 - .tqarg( i18n("Good"), i18n("Excellent"), i18n("Highlight") ) // %7 %8 %9 + .arg( i18n("Priority"), i18n("Low"), i18n("Medium") ) // %1 %2 %3 + .arg( i18n("High"), i18n("Preference"), i18n("Bad") ) // %4 %5 %6 + .arg( i18n("Good"), i18n("Excellent"), i18n("Highlight") ) // %7 %8 %9 + TQString( " <tag>\n" " <name>%1</name>\n" // "Important" @@ -664,9 +664,9 @@ void Tag::createDefaultTagsSet(const TQString &fullPath) " </state>\n" " </tag>""\n" "\n") - .tqarg( i18n("Important"), i18n("Very Important"), i18n("Information") ) // %1 %2 %3 - .tqarg( i18n("Idea"), i18n("The initial of 'Idea'", "I."), i18n("Title") ) // %4 %5 %6 - .tqarg( i18n("Code"), i18n("Work"), i18n("The initial of 'Work'", "W.") ) // %7 %8 %9 + .arg( i18n("Important"), i18n("Very Important"), i18n("Information") ) // %1 %2 %3 + .arg( i18n("Idea"), i18n("The initial of 'Idea'", "I."), i18n("Title") ) // %4 %5 %6 + .arg( i18n("Code"), i18n("Work"), i18n("The initial of 'Work'", "W.") ) // %7 %8 %9 + TQString( " <tag>\n" " <state id=\"personal\">\n" @@ -684,7 +684,7 @@ void Tag::createDefaultTagsSet(const TQString &fullPath) " </tag>\n" "</basketTags>\n" "") - .tqarg( i18n("Personal"), i18n("The initial of 'Personal'", "P."), i18n("Funny") ); // %1 %2 %3 + .arg( i18n("Personal"), i18n("The initial of 'Personal'", "P."), i18n("Funny") ); // %1 %2 %3 // Write to Disk: TQFile file(fullPath); @@ -768,7 +768,7 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac } } -TQSize IndentedMenuItem::tqsizeHint() +TQSize IndentedMenuItem::sizeHint() { int iconSize = KIcon::SizeSmall; int iconMargin = StateMenuItem::iconMargin(); @@ -841,7 +841,7 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ } } -TQSize StateMenuItem::tqsizeHint() +TQSize StateMenuItem::sizeHint() { int iconSize = 16; // We use 16 instead of KIcon::SizeSmall (the size of icons in menus) because tags will always be 16*16 icons TQFont theFont = m_state->font(KGlobalSettings::menuFont()); @@ -851,15 +851,15 @@ TQSize StateMenuItem::tqsizeHint() TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) { - int width = kapp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth, 0); - int height = kapp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight, 0); + int width = kapp->tqstyle().pixelMetric(TQStyle::PM_IndicatorWidth, 0); + int height = kapp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight, 0); TQRect rect(0, 0, width, height); TQColor menuBackgroundColor = (dynamic_cast<KStyle*>(&(kapp->tqstyle())) == NULL ? TQColor(cg.background()) : cg.background().light(103)); // Enabled, Not hovering TQPixmap pixmap(width, height); - pixmap.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws + pixmap.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws TQPainter painter(&pixmap); int style = TQStyle::Style_Enabled | TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); TQColor background = cg.color(TQColorGroup::Background); @@ -868,7 +868,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) // Enabled, Hovering TQPixmap pixmapHover(width, height); - pixmapHover.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws + pixmapHover.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws painter.begin(&pixmapHover); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); @@ -877,7 +877,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) // Disabled TQPixmap pixmapDisabled(width, height); - pixmapDisabled.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws + pixmapDisabled.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws painter.begin(&pixmapDisabled); style = /*TQStyle::Style_Enabled | */TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); cg.setColor(TQColorGroup::Background, background); @@ -892,8 +892,8 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) { - int width = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); - int height = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); + int width = kapp->tqstyle().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); + int height = kapp->tqstyle().pixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); TQRect rect(0, 0, width, height); int style = TQStyle::Style_Default | TQStyle::Style_Enabled | (checked ? TQStyle::Style_On : TQStyle::Style_Off); @@ -908,7 +908,7 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) */ TQRadioButton rb(0); rb.setChecked(checked); - kapp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + kapp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); painter.end(); /* Some styles like Plastik (and derived ones) have TQStyle::PE_ExclusiveIndicator drawing a radiobutton disc, as wanted, * and leave pixels ouside it untouched, BUT TQStyle::PE_ExclusiveIndicatorMask is a fully black square. @@ -924,7 +924,7 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) //kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); - kapp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + kapp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); painter.end(); pixmapHover.setMask(pixmapHover.createHeuristicMask()); @@ -166,7 +166,7 @@ class IndentedMenuItem : public TQCustomMenuItem IndentedMenuItem(const TQString &text, const TQString &icon = "", const TQString &shortcut = ""); ~IndentedMenuItem(); void paint(TQPainter *painter, const TQColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h); - TQSize tqsizeHint(); + TQSize sizeHint(); bool fullSpan() { return true; } private: TQString m_text; @@ -183,7 +183,7 @@ class StateMenuItem : public TQCustomMenuItem StateMenuItem(State *state, const TQString &shortcut, bool withTagName = false); ~StateMenuItem(); void paint(TQPainter *painter, const TQColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h); - TQSize tqsizeHint(); + TQSize sizeHint(); bool fullSpan() { return true; } private: State *m_state; diff --git a/src/tagsedit.cpp b/src/tagsedit.cpp index 3cbca01..d5162a2 100644 --- a/src/tagsedit.cpp +++ b/src/tagsedit.cpp @@ -22,7 +22,7 @@ #include <tqlabel.h> #include <tqlineedit.h> #include <kfontcombo.h> -#include <tqlayout.h> +#include <layout.h> #include <kkeybutton.h> #include <kicondialog.h> #include <kiconloader.h> @@ -204,7 +204,7 @@ void TagListViewItem::setup() State *state = (m_tagCopy ? m_tagCopy->stateCopies[0]->newState : m_stateCopy->newState); if (m_tagCopy && !m_tagCopy->newTag->shortcut().isNull()) - text = i18n("Tag name (shortcut)", "%1 (%2)").tqarg(text, m_tagCopy->newTag->shortcut().toString()); + text = i18n("Tag name (shortcut)", "%1 (%2)").arg(text, m_tagCopy->newTag->shortcut().toString()); TQFont font = state->font(listView()->font()); @@ -214,17 +214,17 @@ void TagListViewItem::setup() int height = TAG_MARGIN + TQMAX(TAG_ICON_SIZE, textRect.height()) + TAG_MARGIN; setHeight(height); - tqrepaint(); + repaint(); } -void TagListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*tqcolorGroup*/, int /*column*/, int width, int /*align*/) +void TagListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*colorGroup*/, int /*column*/, int width, int /*align*/) { bool withIcon = m_stateCopy || (m_tagCopy && !m_tagCopy->isMultiState()); TQString text = (m_tagCopy ? m_tagCopy->newTag->name() : m_stateCopy->newState->name()); State *state = (m_tagCopy ? m_tagCopy->stateCopies[0]->newState : m_stateCopy->newState); if (m_tagCopy && !m_tagCopy->newTag->shortcut().isNull()) - text = i18n("Tag name (shortcut)", "%1 (%2)").tqarg(text, m_tagCopy->newTag->shortcut().toString()); + text = i18n("Tag name (shortcut)", "%1 (%2)").arg(text, m_tagCopy->newTag->shortcut().toString()); TQFont font = (withIcon ? state->font(listView()->font()) : listView()->font()); @@ -326,7 +326,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew KDialogBase::Ok, parent, /*name=*/"CustomizeTags", /*modal=*/true, /*separator=*/true), m_loading(false) { - TQHBoxLayout *tqlayout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint()); + TQHBoxLayout *layout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint()); /* Left part: */ @@ -366,7 +366,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew leftLayout->addWidget(m_tags); leftLayout->addLayout(topLeftLayout); - tqlayout->addLayout(leftLayout); + layout->addLayout(leftLayout); /* Right part: */ @@ -411,8 +411,8 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew connect( m_removeEmblem, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeEmblem()) ); // m_emblem.resetIcon() is not a slot! // Make the icon button and the remove button the same height: - int height = TQMAX(m_emblem->tqsizeHint().width(), m_emblem->tqsizeHint().height()); - height = TQMAX(height, m_removeEmblem->tqsizeHint().height()); + int height = TQMAX(m_emblem->sizeHint().width(), m_emblem->sizeHint().height()); + height = TQMAX(height, m_removeEmblem->sizeHint().height()); m_emblem->setFixedSize(height, height); // Make it square m_removeEmblem->setFixedHeight(height); m_emblem->resetIcon(); @@ -432,7 +432,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew TQIconSet boldIconSet = kapp->iconLoader()->loadIconSet("text_bold", KIcon::Small); m_bold = new TQPushButton(boldIconSet, "", stateWidget); m_bold->setToggleButton(true); - int size = TQMAX(m_bold->tqsizeHint().width(), m_bold->tqsizeHint().height()); + int size = TQMAX(m_bold->sizeHint().width(), m_bold->sizeHint().height()); m_bold->setFixedSize(size, size); // Make it square! TQToolTip::add(m_bold, i18n("Bold")); @@ -540,18 +540,18 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew rightLayout->addWidget(m_stateBox); rightLayout->addStretch(); - tqlayout->addWidget(rightWidget); - rightWidget->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Expanding); + layout->addWidget(rightWidget); + rightWidget->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Expanding); // Equalize the width of the first column of the two grids: - int maxWidth = tagNameLabel->tqsizeHint().width(); - maxWidth = TQMAX(maxWidth, shortcutLabel->tqsizeHint().width()); - maxWidth = TQMAX(maxWidth, m_stateNameLabel->tqsizeHint().width()); - maxWidth = TQMAX(maxWidth, emblemLabel->tqsizeHint().width()); - maxWidth = TQMAX(maxWidth, textLabel->tqsizeHint().width()); - maxWidth = TQMAX(maxWidth, fontLabel->tqsizeHint().width()); - maxWidth = TQMAX(maxWidth, backgroundColorLabel->tqsizeHint().width()); - maxWidth = TQMAX(maxWidth, textEquivalentLabel->tqsizeHint().width()); + int maxWidth = tagNameLabel->sizeHint().width(); + maxWidth = TQMAX(maxWidth, shortcutLabel->sizeHint().width()); + maxWidth = TQMAX(maxWidth, m_stateNameLabel->sizeHint().width()); + maxWidth = TQMAX(maxWidth, emblemLabel->sizeHint().width()); + maxWidth = TQMAX(maxWidth, textLabel->sizeHint().width()); + maxWidth = TQMAX(maxWidth, fontLabel->sizeHint().width()); + maxWidth = TQMAX(maxWidth, backgroundColorLabel->sizeHint().width()); + maxWidth = TQMAX(maxWidth, textEquivalentLabel->sizeHint().width()); tagNameLabel->setFixedWidth(maxWidth); m_stateNameLabel->setFixedWidth(maxWidth); @@ -664,8 +664,8 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew connect( rename, TQT_SIGNAL(activated()), this, TQT_SLOT(renameIt()) ); m_tags->setMinimumSize( - m_tags->tqsizeHint().width() * 2, - m_tagBox->tqsizeHint().height() + m_stateBox->tqsizeHint().height() + m_tags->sizeHint().width() * 2, + m_tagBox->sizeHint().height() + m_stateBox->sizeHint().height() ); if (addNewTag) @@ -681,7 +681,7 @@ TagsEditDialog::~TagsEditDialog() void TagsEditDialog::resetTreeSizeHint() { - m_tags->setMinimumSize(m_tags->tqsizeHint()); + m_tags->setMinimumSize(m_tags->sizeHint()); } TagListViewItem* TagsEditDialog::itemForState(State *state) diff --git a/src/tagsedit.h b/src/tagsedit.h index 41fbb42..a97582c 100644 --- a/src/tagsedit.h +++ b/src/tagsedit.h @@ -87,7 +87,7 @@ class TagListViewItem : public TQListViewItem TagListViewItem* parent() const; // Reimplemented to cast the return value int width(const TQFontMetrics &fontMetrics, const TQListView *listView, int column) const; void setup(); - void paintCell(TQPainter *painter, const TQColorGroup &tqcolorGroup, int column, int width, int align); + void paintCell(TQPainter *painter, const TQColorGroup &colorGroup, int column, int width, int align); private: TagCopy *m_tagCopy; diff --git a/src/tools.cpp b/src/tools.cpp index 4bccb66..03a710b 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -22,7 +22,7 @@ #include <tqstring.h> #include <tqpixmap.h> #include <tqimage.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqregexp.h> #include <tqvaluestack.h> #include <tqfileinfo.h> @@ -427,7 +427,7 @@ TQString Tools::fileNameForNewFile(const TQString &wantedName, const TQString &d bool Tools::isAFileCut(TQMimeSource *source) { if (source->provides("application/x-kde-cutselection")) { - TQByteArray array = source->tqencodedData("application/x-kde-cutselection"); + TQByteArray array = source->encodedData("application/x-kde-cutselection"); return !array.isEmpty() && TQCString(array.data(), array.size() + 1).at(0) == '1'; } else return false; diff --git a/src/variouswidgets.cpp b/src/variouswidgets.cpp index d24725a..31d2c64 100644 --- a/src/variouswidgets.cpp +++ b/src/variouswidgets.cpp @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqlabel.h> #include <tqsizegrip.h> @@ -42,14 +42,14 @@ RunCommandRequester::RunCommandRequester(const TQString &runCommand, const TQStr { m_message = message; - TQHBoxLayout *tqlayout = new TQHBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); + TQHBoxLayout *layout = new TQHBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); m_runCommand = new TQLineEdit(runCommand, this); TQPushButton *pb = new TQPushButton(/*"C&hoose..."*/i18n("..."), this); - pb->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + pb->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); - tqlayout->addWidget(m_runCommand); - tqlayout->addWidget(pb); + layout->addWidget(m_runCommand); + layout->addWidget(pb); connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelCommand()) ); } @@ -129,11 +129,11 @@ ViewSizeDialog::ViewSizeDialog(TQWidget *parent, int w, int h) "Resize the window to select the image size\n" "and close it or press Escape to accept changes."), this); label->move(8, 8); - label->setFixedSize( label->tqsizeHint() ); + label->setFixedSize( label->sizeHint() ); // setSizeGripEnabled(true) doesn't work (the grip stay at the same place), so we emulate it: m_sizeGrip = new TQSizeGrip(this); - m_sizeGrip->setFixedSize( m_sizeGrip->tqsizeHint() ); + m_sizeGrip->setFixedSize( m_sizeGrip->sizeHint() ); setGeometry(x(), y(), w, h); } @@ -144,7 +144,7 @@ ViewSizeDialog::~ViewSizeDialog() void ViewSizeDialog::resizeEvent(TQResizeEvent *) { - setCaption( i18n("%1 by %2 pixels").tqarg(TQString::number(width())).tqarg(TQString::number(height())) ); + setCaption( i18n("%1 by %2 pixels").arg(TQString::number(width())).arg(TQString::number(height())) ); m_sizeGrip->move( width() - m_sizeGrip->width(), height() - m_sizeGrip->height() ); } @@ -269,7 +269,7 @@ FontSizeCombo::FontSizeCombo(bool rw, bool withDefault, TQWidget *parent, const insertItem(i18n("(Default)")); TQFontDatabase fontDB; - TQValueList<int> sizes = fontDB.tqstandardSizes(); + TQValueList<int> sizes = fontDB.standardSizes(); for (TQValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it) insertItem(TQString::number(*it)); |