Revert "Rename a number of old tq methods that are no longer tq specific"

This reverts commit 882bcd26b3.
pull/1/head
Timothy Pearson 13 years ago
parent 882bcd26b3
commit ae6cafee53

@ -22,7 +22,7 @@
#include <tqdir.h> #include <tqdir.h>
#include <tqfile.h> #include <tqfile.h>
#include <tqfileinfo.h> #include <tqfileinfo.h>
#include <textstream.h> #include <tqtextstream.h>
#include <ktempdir.h> #include <ktempdir.h>
#include "basketthumbcreator.h" #include "basketthumbcreator.h"

@ -30,24 +30,24 @@ BasketDcopInterface_stub::BasketDcopInterface_stub( const DCOPRef& ref )
void BasketDcopInterface_stub::newBasket() void BasketDcopInterface_stub::newBasket()
{ {
if ( !dcopClient() ) { if ( !dcopClient() ) {
setStatus( CallFailed ); settqStatus( CallFailed );
return; return;
} }
TQByteArray data; TQByteArray data;
dcopClient()->send( app(), obj(), "newBasket()", data ); dcopClient()->send( app(), obj(), "newBasket()", data );
setStatus( CallSucceeded ); settqStatus( CallSucceeded );
} }
void BasketDcopInterface_stub::handleCommandLine() void BasketDcopInterface_stub::handleCommandLine()
{ {
if ( !dcopClient() ) { if ( !dcopClient() ) {
setStatus( CallFailed ); settqStatus( CallFailed );
return; return;
} }
TQByteArray data, replyData; TQByteArray data, replyData;
TQCString replyType; TQCString replyType;
if ( dcopClient()->call( app(), obj(), "handleCommandLine()", data, replyType, replyData ) ) { if ( dcopClient()->call( app(), obj(), "handleCommandLine()", data, replyType, replyData ) ) {
setStatus( CallSucceeded ); settqStatus( CallSucceeded );
} else { } else {
callFailed(); callFailed();
} }

@ -313,7 +313,7 @@ void Archive::open(const TQString &path)
"It can be opened but not every information will be available to you. " "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. " "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.") "When saving the file back, consider to save it to another file, to preserve the original one.")
.arg(kapp->aboutData()->programName()), .tqarg(kapp->aboutData()->programName()),
i18n("Basket Archive Error") i18n("Basket Archive Error")
); );
} }
@ -321,7 +321,7 @@ void Archive::open(const TQString &path)
KMessageBox::error( KMessageBox::error(
0, 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.") i18n("This file was created with a recent version of %1. Please upgrade to a newer version to be able to open that file.")
.arg(kapp->aboutData()->programName()), .tqarg(kapp->aboutData()->programName()),
i18n("Basket Archive Error") i18n("Basket Archive Error")
); );
file.close(); file.close();

@ -28,7 +28,7 @@
#include <tqhbox.h> #include <tqhbox.h>
#include <tqvbox.h> #include <tqvbox.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <klocale.h> #include <klocale.h>
@ -65,7 +65,7 @@ BackupDialog::BackupDialog(TQWidget *parent, const char *name)
savesFolder = savesFolder.left(savesFolder.length() - 1); // savesFolder ends with "/" savesFolder = savesFolder.left(savesFolder.length() - 1); // savesFolder ends with "/"
TQGroupBox *folderGroup = new TQGroupBox(1, Qt::Horizontal, i18n("Save Folder"), page); 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>").arg(savesFolder), folderGroup); new TQLabel("<qt><nobr>" + i18n("Your baskets are currently stored in that folder:<br><b>%1</b>").tqarg(savesFolder), folderGroup);
TQWidget *folderWidget = new TQWidget(folderGroup); TQWidget *folderWidget = new TQWidget(folderGroup);
TQHBoxLayout *folderLayout = new TQHBoxLayout(folderWidget, 0, spacingHint()); TQHBoxLayout *folderLayout = new TQHBoxLayout(folderWidget, 0, spacingHint());
TQPushButton *moveFolder = new TQPushButton(i18n("&Move to Another Folder..."), folderWidget); 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>" "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>" "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>") "</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>")
.arg(kapp->aboutData()->programName()) .tqarg(kapp->aboutData()->programName())
.arg(kapp->aboutData()->programName()) .tqarg(kapp->aboutData()->programName())
.arg(kapp->aboutData()->programName()), .tqarg(kapp->aboutData()->programName()),
folderWidget); folderWidget);
folderLayout->addWidget(moveFolder); folderLayout->addWidget(moveFolder);
folderLayout->addWidget(useFolder); folderLayout->addWidget(useFolder);
@ -103,7 +103,7 @@ BackupDialog::BackupDialog(TQWidget *parent, const char *name)
populateLastBackup(); populateLastBackup();
(new TQWidget(page))->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); (new TQWidget(page))->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
} }
BackupDialog::~BackupDialog() BackupDialog::~BackupDialog()
@ -114,7 +114,7 @@ void BackupDialog::populateLastBackup()
{ {
TQString lastBackupText = i18n("Last backup: never"); TQString lastBackupText = i18n("Last backup: never");
if (Settings::lastBackup().isValid()) if (Settings::lastBackup().isValid())
lastBackupText = i18n("Last backup: %1").arg(Settings::lastBackup().toString(Qt::LocalDate)); lastBackupText = i18n("Last backup: %1").tqarg(Settings::lastBackup().toString(Qt::LocalDate));
m_lastBackup->setText(lastBackupText); m_lastBackup->setText(lastBackupText);
} }
@ -135,7 +135,7 @@ void BackupDialog::moveToAnotherFolder()
if (content.count() > 2) { // "." and ".." if (content.count() > 2) { // "." and ".."
int result = KMessageBox::questionYesNo( int result = KMessageBox::questionYesNo(
0, 0,
"<qt>" + i18n("The folder <b>%1</b> is not empty. Do you want to override it?").arg(folder), "<qt>" + i18n("The folder <b>%1</b> is not empty. Do you want to override it?").tqarg(folder),
i18n("Override Folder?"), i18n("Override Folder?"),
KGuiItem(i18n("&Override"), "filesave") KGuiItem(i18n("&Override"), "filesave")
); );
@ -170,7 +170,7 @@ void BackupDialog::backup()
config->setGroup("Backups"); config->setGroup("Backups");
TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/";
TQString fileName = i18n("Backup filename (without extension), %1 is the date", "Baskets_%1") TQString fileName = i18n("Backup filename (without extension), %1 is the date", "Baskets_%1")
.arg(TQDate::currentDate().toString(Qt::ISODate)); .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
TQString url = folder + fileName; TQString url = folder + fileName;
// Ask a file name & path to the user: // Ask a file name & path to the user:
@ -187,7 +187,7 @@ void BackupDialog::backup()
int result = KMessageBox::questionYesNoCancel( int result = KMessageBox::questionYesNoCancel(
0, 0,
"<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?") "<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?")
.arg(KURL(destination).fileName()), .tqarg(KURL(destination).fileName()),
i18n("Override File?"), i18n("Override File?"),
KGuiItem(i18n("&Override"), "filesave") 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 usleep(300); // Not too long because if the backup process is finished, we wait for nothing
} }
Settings::setLastBackup(TQDate::currentDate()); Settings::setLastBackup(TQDate::tqcurrentDate());
Settings::saveConfig(); Settings::saveConfig();
populateLastBackup(); populateLastBackup();
} }
@ -245,7 +245,7 @@ void BackupDialog::restore()
TQFile file(readmePath); TQFile file(readmePath);
if (file.open(IO_WriteOnly)) { if (file.open(IO_WriteOnly)) {
TQTextStream stream(&file); TQTextStream stream(&file);
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" 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"
<< i18n("If the restoration was a success and you restored what you wanted to restore, you can remove this folder.") + "\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("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"; << i18n("Choose \"Basket\" -> \"Backup & Restore...\" -> \"Use Another Existing Folder...\" and select that folder.") + "\n";
@ -253,8 +253,8 @@ void BackupDialog::restore()
} }
TQString message = TQString message =
"<p><nobr>" + i18n("Restoring <b>%1</b>. Please wait...").arg(KURL(path).fileName()) + "</nobr></p><p>" + "<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>.").arg(readmePath); i18n("If something goes wrong during the restoration process, read the file <b>%1</b>.").tqarg(readmePath);
KProgressDialog *dialog = new KProgressDialog(0, 0, i18n("Restore Baskets"), message, /*modal=*/true); KProgressDialog *dialog = new KProgressDialog(0, 0, i18n("Restore Baskets"), message, /*modal=*/true);
dialog->setAllowCancel(false); 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: // This is important for users to trust the application in such a critical phase and understands what's happening:
KMessageBox::information( KMessageBox::information(
0, 0,
"<qt>" + message.arg( "<qt>" + message.tqarg(
(folder.endsWith("/") ? folder.left(folder.length() - 1) : folder), (folder.endsWith("/") ? folder.left(folder.length() - 1) : folder),
kapp->aboutData()->programName()), kapp->aboutData()->programName()),
i18n("Restart") i18n("Restart")
@ -353,7 +353,7 @@ TQString Backup::newSafetyFolder()
return fullPath; return fullPath;
for (int i = 2; ; ++i) { for (int i = 2; ; ++i) {
fullPath = TQDir::homeDirPath() + "/" + i18n("Safety folder name before restoring a basket data archive", "Baskets Before Restoration (%1)").arg(i) + "/"; fullPath = TQDir::homeDirPath() + "/" + i18n("Safety folder name before restoring a basket data archive", "Baskets Before Restoration (%1)").tqarg(i) + "/";
if (!dir.exists(fullPath)) if (!dir.exists(fullPath))
return fullPath; return fullPath;
} }

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

@ -27,7 +27,7 @@
#include <tqtimer.h> #include <tqtimer.h>
#include <tqimage.h> #include <tqimage.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <kshortcut.h> #include <kshortcut.h>
#include <kdirwatch.h> #include <kdirwatch.h>
#include <kaction.h> #include <kaction.h>
@ -690,7 +690,7 @@ public slots:
#include <tqwidget.h> #include <tqwidget.h>
#include <tqscrollview.h> #include <tqscrollview.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <tqptrlist.h> #include <tqptrlist.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <kio/job.h> #include <kio/job.h>

@ -76,12 +76,12 @@ TQString BasketFactory::unpackTemplate(const TQString &templateName)
" <properties>\n" " <properties>\n"
" <disposition mindMap=\"%1\" columnCount=\"%2\" free=\"%3\" />\n" " <disposition mindMap=\"%1\" columnCount=\"%2\" free=\"%3\" />\n"
" </properties>\n" " </properties>\n"
" <notes>\n" ).arg( (templateName == "mindmap" ? "true" : "false"), " <notes>\n" ).tqarg( (templateName == "mindmap" ? "true" : "false"),
TQString::number(nbColumns), TQString::number(nbColumns),
(templateName == "free" || templateName == "mindmap" ? "true" : "false") ); (templateName == "free" || templateName == "mindmap" ? "true" : "false") );
if (nbColumns > 0) if (nbColumns > 0)
for (int i = 0; i < nbColumns; ++i) for (int i = 0; i < nbColumns; ++i)
stream << TQString(" <group width=\"%1\"></group>\n").arg(columnWidth); stream << TQString(" <group width=\"%1\"></group>\n").tqarg(columnWidth);
stream << " </notes>\n" stream << " </notes>\n"
"</basket>\n"; "</basket>\n";
file.close(); file.close();

@ -109,8 +109,8 @@ TQString BasketListViewItem::escapedName(const TQString &string)
TQString letter; // Find the letter TQString letter; // Find the letter
TQString altKey = /*i18n(*/"Alt"/*)*/; //i18n("The [Alt] key, as shown in shortcuts like Alt+C...", "Alt"); 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"); TQString shiftKey = /*i18n(*/"Shift"/*)*/; //i18n("The [Shift] key, as shown in shortcuts like Alt+Shift+1...", "Shift");
TQRegExp altLetterExp( TQString("^%1\\+(.)$").arg(altKey) ); TQRegExp altLetterExp( TQString("^%1\\+(.)$").tqarg(altKey) );
TQRegExp altShiftLetterExp( TQString("^%1\\+%2\\+(.)$").arg(altKey, shiftKey) ); TQRegExp altShiftLetterExp( TQString("^%1\\+%2\\+(.)$").tqarg(altKey, shiftKey) );
if (altLetterExp.search(m_basket->shortcut().toStringInternal()) != -1) if (altLetterExp.search(m_basket->shortcut().toStringInternal()) != -1)
letter = altLetterExp.cap(1); letter = altLetterExp.cap(1);
if (letter.isEmpty() && altShiftLetterExp.search(m_basket->shortcut().toStringInternal()) != -1) if (letter.isEmpty() && altShiftLetterExp.search(m_basket->shortcut().toStringInternal()) != -1)
@ -140,7 +140,7 @@ void BasketListViewItem::setup()
setPixmap(/*column=*/0, icon); setPixmap(/*column=*/0, icon);
repaint(); tqrepaint();
} }
BasketListViewItem* BasketListViewItem::lastChild() 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) TQPixmap BasketListViewItem::circledTextPixmap(const TQString &text, int height, const TQFont &font, const TQColor &color)
{ {
TQString key = TQString("BLI-%1.%2.%3.%4") TQString key = TQString("BLI-%1.%2.%3.%4")
.arg(text).arg(height).arg(font.toString()).arg(color.rgb()); .tqarg(text).tqarg(height).tqarg(font.toString()).tqarg(color.rgb());
if (TQPixmap* cached=TQPixmapCache::find(key)) { if (TQPixmap* cached=TQPixmapCache::find(key)) {
return *cached; return *cached;
} }
@ -335,12 +335,12 @@ TQPixmap BasketListViewItem::foundCountPixmap(bool isLoading, int countFound, bo
TQString text; TQString text;
if (childsAreLoading) { if (childsAreLoading) {
if (countChildsFound > 0) if (countChildsFound > 0)
text = i18n("%1+%2+").arg(TQString::number(countFound), TQString::number(countChildsFound)); text = i18n("%1+%2+").tqarg(TQString::number(countFound), TQString::number(countChildsFound));
else else
text = i18n("%1+").arg(TQString::number(countFound)); text = i18n("%1+").tqarg(TQString::number(countFound));
} else { } else {
if (countChildsFound > 0) if (countChildsFound > 0)
text = i18n("%1+%2").arg(TQString::number(countFound), TQString::number(countChildsFound)); text = i18n("%1+%2").tqarg(TQString::number(countFound), TQString::number(countChildsFound));
else if (countFound > 0) else if (countFound > 0)
text = TQString::number(countFound); text = TQString::number(countFound);
else else
@ -412,7 +412,7 @@ int BasketListViewItem::countHiddenChildsFound()
return countChildsFound(); return countChildsFound();
} }
void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*colorGroup*/, int /*column*/, int width, int /*align*/) void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*tqcolorGroup*/, int /*column*/, int width, int /*align*/)
{ {
// Workaround a TQt bug: // Workaround a TQt bug:
// When the splitter is moved to hide the tree view and then the application is restarted, // 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 &/*col
// Don't forget to update the key computation if parameters // Don't forget to update the key computation if parameters
// affecting the rendering logic change // 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") TQString key = TQString("BLVI::pC-%1.%2.%3.%4.%5.%6.%7.%8.%9.%10.%11.%12.%13.%14.%15")
.arg(effectiveWidth) .tqarg(effectiveWidth)
.arg(drawRoundRect) .tqarg(drawRoundRect)
.arg(textColor.rgb()) .tqarg(textColor.rgb())
.arg(m_basket->backgroundColor().rgb()) .tqarg(m_basket->backgroundColor().rgb())
.arg(isCurrentBasket()) .tqarg(isCurrentBasket())
.arg(shownBelow && shownBelow->isCurrentBasket()) .tqarg(shownBelow && shownBelow->isCurrentBasket())
.arg(shownAbove && shownAbove->isCurrentBasket()) .tqarg(shownAbove && shownAbove->isCurrentBasket())
.arg(showLoadingIcon) .tqarg(showLoadingIcon)
.arg(showEncryptedIcon) .tqarg(showEncryptedIcon)
.arg(showCountPixmap) .tqarg(showCountPixmap)
.arg(m_basket->countFounds()) .tqarg(m_basket->countFounds())
.arg(countHiddenChildsFound()) .tqarg(countHiddenChildsFound())
.arg(m_isUnderDrag) .tqarg(m_isUnderDrag)
.arg(m_basket->basketName()) .tqarg(m_basket->basketName())
.arg(m_basket->icon()); .tqarg(m_basket->icon());
if (TQPixmap* cached = TQPixmapCache::find(key)) { if (TQPixmap* cached = TQPixmapCache::find(key)) {
// TQt's documentation recommends copying the pointer // TQt's documentation recommends copying the pointer
// into a TQPixmap immediately // into a TQPixmap immediately
@ -623,7 +623,7 @@ public:
TQListViewItem *item = m_basketView->itemAt(m_basketView->contentsToViewport(pos)); TQListViewItem *item = m_basketView->itemAt(m_basketView->contentsToViewport(pos));
BasketListViewItem* bitem = dynamic_cast<BasketListViewItem*>(item); BasketListViewItem* bitem = dynamic_cast<BasketListViewItem*>(item);
if (bitem && bitem->isAbbreviated()) { if (bitem && bitem->isAbbreviated()) {
tip(m_basketView->itemRect(bitem), bitem->basket()->basketName()); tip(m_basketView->tqitemRect(bitem), bitem->basket()->basketName());
} }
} }
private: private:

@ -50,7 +50,7 @@ class BasketListViewItem : public TQListViewItem
void ensureVisible(); void ensureVisible();
bool isShown(); bool isShown();
bool isCurrentBasket(); bool isCurrentBasket();
void paintCell(TQPainter *painter, const TQColorGroup &colorGroup, int column, int width, int align); void paintCell(TQPainter *painter, const TQColorGroup &tqcolorGroup, int column, int width, int align);
TQString escapedName(const TQString &string); TQString escapedName(const TQString &string);
/// ///
TQPixmap circledTextPixmap(const TQString &text, int height, const TQFont &font, const TQColor &color); TQPixmap circledTextPixmap(const TQString &text, int height, const TQFont &font, const TQColor &color);

@ -24,7 +24,7 @@
#include <tqvbuttongroup.h> #include <tqvbuttongroup.h>
#include <knuminput.h> #include <knuminput.h>
#include <kkeybutton.h> #include <kkeybutton.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqbuttongroup.h> #include <tqbuttongroup.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
@ -56,7 +56,7 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent)
m_icon->setIconType(KIcon::NoGroup, KIcon::Action); m_icon->setIconType(KIcon::NoGroup, KIcon::Action);
m_icon->setIconSize(16); m_icon->setIconSize(16);
m_icon->setIcon(m_basket->icon()); m_icon->setIcon(m_basket->icon());
int size = TQMAX(m_icon->sizeHint().width(), m_icon->sizeHint().height()); int size = TQMAX(m_icon->tqsizeHint().width(), m_icon->tqsizeHint().height());
m_icon->setFixedSize(size, size); // Make it square! m_icon->setFixedSize(size, size); // Make it square!
TQToolTip::add(m_icon, i18n("Icon")); TQToolTip::add(m_icon, i18n("Icon"));
m_name = new TQLineEdit(m_basket->basketName(), page); m_name = new TQLineEdit(m_basket->basketName(), page);
@ -99,8 +99,8 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent)
} }
} }
// m_backgroundImage->insertItem(i18n("Other..."), -1); // m_backgroundImage->insertItem(i18n("Other..."), -1);
int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin);
m_backgroundImage->setSizeLimit(50/*75 * 6 / m_backgroundImage->sizeHint().height()*/); m_backgroundImage->setSizeLimit(50/*75 * 6 / m_backgroundImage->tqsizeHint().height()*/);
m_backgroundImage->setMinimumHeight(75 + 2 * BUTTON_MARGIN); m_backgroundImage->setMinimumHeight(75 + 2 * BUTTON_MARGIN);
// Disposition: // Disposition:
@ -117,8 +117,8 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent)
m_disposition->insert(radio); m_disposition->insert(radio);
new TQRadioButton(i18n("&Free-form"), m_disposition); new TQRadioButton(i18n("&Free-form"), m_disposition);
TQRadioButton *mindMap = new TQRadioButton(i18n("&Mind map"), m_disposition); // TODO: "Learn more..." TQRadioButton *mindMap = new TQRadioButton(i18n("&Mind map"), m_disposition); // TODO: "Learn more..."
int height = TQMAX(mindMap->sizeHint().height(), m_columnCount->sizeHint().height()); // Make all radioButtons vertically equaly-spaced! int height = TQMAX(mindMap->tqsizeHint().height(), m_columnCount->tqsizeHint().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. mindMap->setMinimumSize(mindMap->tqsizeHint().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); m_disposition->setButton(m_basket->isFreeLayout() ? (m_basket->isMindMap() ? 2 : 1) : 0);
topLayout->addWidget(m_disposition); topLayout->addWidget(m_disposition);

@ -34,12 +34,12 @@
#include <tqtooltip.h> #include <tqtooltip.h>
BasketStatusBar::BasketStatusBar(KStatusBar *bar) BasketStatusBar::BasketStatusBar(KStatusBar *bar)
: m_bar(bar), m_extension(0), m_selectionStatus(0), m_lockStatus(0), m_basketStatus(0), m_savedStatus(0) : m_bar(bar), m_extension(0), m_selectiontqStatus(0), m_locktqStatus(0), m_baskettqStatus(0), m_savedtqStatus(0)
{ {
} }
BasketStatusBar::BasketStatusBar(KParts::StatusBarExtension *extension) BasketStatusBar::BasketStatusBar(KParts::StatusBarExtension *extension)
: m_bar(0), m_extension(extension), m_selectionStatus(0), m_lockStatus(0), m_basketStatus(0), m_savedStatus(0) : m_bar(0), m_extension(extension), m_selectiontqStatus(0), m_locktqStatus(0), m_baskettqStatus(0), m_savedtqStatus(0)
{ {
} }
@ -72,32 +72,32 @@ void BasketStatusBar::setupStatusBar()
//Tools::printChildren(parent); //Tools::printChildren(parent);
if(lst->count() == 0) if(lst->count() == 0)
{ {
m_basketStatus = new TQLabel(parent); m_baskettqStatus = new TQLabel(parent);
m_basketStatus->setSizePolicy( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored, 0, 0, false) ); m_baskettqStatus->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored, 0, 0, false) );
addWidget( m_basketStatus, 1, false ); // Fit all extra space and is hiddable addWidget( m_baskettqStatus, 1, false ); // Fit all extra space and is hiddable
} }
else else
m_basketStatus = static_cast<TQLabel*>(TQT_TQWIDGET(lst->at(0))); m_baskettqStatus = static_cast<TQLabel*>(TQT_TQWIDGET(lst->at(0)));
delete lst; delete lst;
m_selectionStatus = new TQLabel(i18n("Loading..."), parent); m_selectiontqStatus = new TQLabel(i18n("Loading..."), parent);
addWidget( m_selectionStatus, 0, true ); addWidget( m_selectiontqStatus, 0, true );
m_lockStatus = new ClickableLabel(0/*this*/); m_locktqStatus = new ClickableLabel(0/*this*/);
m_lockStatus->setMinimumSize(18, 18); m_locktqStatus->setMinimumSize(18, 18);
m_lockStatus->setAlignment(TQt::AlignCenter); m_locktqStatus->tqsetAlignment(TQt::AlignCenter);
// addWidget( m_lockStatus, 0, true ); // addWidget( m_locktqStatus, 0, true );
connect( m_lockStatus, TQT_SIGNAL(clicked()), Global::bnpView, TQT_SLOT(lockBasket()) ); connect( m_locktqStatus, TQT_SIGNAL(clicked()), Global::bnpView, TQT_SLOT(lockBasket()) );
m_savedStatusPixmap = SmallIcon("filesave"); m_savedStatusPixmap = SmallIcon("filesave");
m_savedStatus = new TQLabel(parent); m_savedtqStatus = new TQLabel(parent);
m_savedStatus->setPixmap(m_savedStatusPixmap); m_savedtqStatus->setPixmap(m_savedStatusPixmap);
m_savedStatus->setFixedSize(m_savedStatus->sizeHint()); m_savedtqStatus->setFixedSize(m_savedtqStatus->tqsizeHint());
m_savedStatus->clear(); m_savedtqStatus->clear();
//m_savedStatus->setPixmap(m_savedStatusIconSet.pixmap(TQIconSet::Small, TQIconSet::Disabled)); //m_savedtqStatus->setPixmap(m_savedStatusIconSet.pixmap(TQIconSet::Small, TQIconSet::Disabled));
//m_savedStatus->setEnabled(false); //m_savedtqStatus->setEnabled(false);
addWidget( m_savedStatus, 0, true ); addWidget( m_savedtqStatus, 0, true );
TQToolTip::add(m_savedStatus, "<p>" + i18n("Shows if there are changes that have not yet been saved.")); TQToolTip::add(m_savedtqStatus, "<p>" + i18n("Shows if there are changes that have not yet been saved."));
} }
void BasketStatusBar::postStatusbarMessage(const TQString& text) void BasketStatusBar::postStatusbarMessage(const TQString& text)
@ -108,8 +108,8 @@ void BasketStatusBar::postStatusbarMessage(const TQString& text)
void BasketStatusBar::setStatusText(const TQString &txt) void BasketStatusBar::setStatusText(const TQString &txt)
{ {
if(m_basketStatus && m_basketStatus->text() != txt) if(m_baskettqStatus && m_baskettqStatus->text() != txt)
m_basketStatus->setText(txt); m_baskettqStatus->setText(txt);
} }
void BasketStatusBar::setStatusBarHint(const TQString &hint) void BasketStatusBar::setStatusBarHint(const TQString &hint)
@ -137,40 +137,40 @@ void BasketStatusBar::updateStatusBarHint()
setStatusText(message); setStatusText(message);
} }
void BasketStatusBar::setLockStatus(bool isLocked) void BasketStatusBar::setLocktqStatus(bool isLocked)
{ {
if(!m_lockStatus) if(!m_locktqStatus)
return; return;
if (isLocked) { if (isLocked) {
m_lockStatus->setPixmap(SmallIcon("encrypted.png")); m_locktqStatus->setPixmap(SmallIcon("encrypted.png"));
TQToolTip::add(m_lockStatus, i18n( TQToolTip::add(m_locktqStatus, i18n(
"<p>This basket is <b>locked</b>.<br>Click to unlock it.</p>").replace(" ", "&nbsp;") ); "<p>This basket is <b>locked</b>.<br>Click to unlock it.</p>").replace(" ", "&nbsp;") );
// TQToolTip::add(m_lockStatus, i18n("This basket is locked.\nClick to unlock it.")); // TQToolTip::add(m_locktqStatus, i18n("This basket is locked.\nClick to unlock it."));
} else { } else {
m_lockStatus->clear(); m_locktqStatus->clear();
TQToolTip::add(m_lockStatus, i18n( TQToolTip::add(m_locktqStatus, i18n(
"<p>This basket is <b>unlocked</b>.<br>Click to lock it.</p>").replace(" ", "&nbsp;") ); "<p>This basket is <b>unlocked</b>.<br>Click to lock it.</p>").replace(" ", "&nbsp;") );
// TQToolTip::add(m_lockStatus, i18n("This basket is unlocked.\nClick to lock it.")); // TQToolTip::add(m_locktqStatus, i18n("This basket is unlocked.\nClick to lock it."));
} }
} }
void BasketStatusBar::setSelectionStatus(const TQString &s) void BasketStatusBar::setSelectiontqStatus(const TQString &s)
{ {
if (m_selectionStatus) if (m_selectiontqStatus)
m_selectionStatus->setText(s); m_selectiontqStatus->setText(s);
} }
void BasketStatusBar::setUnsavedStatus(bool isUnsaved) void BasketStatusBar::setUnsavedtqStatus(bool isUnsaved)
{ {
if (!m_savedStatus) if (!m_savedtqStatus)
return; return;
if (isUnsaved) { if (isUnsaved) {
if (m_savedStatus->pixmap() == 0) if (m_savedtqStatus->pixmap() == 0)
m_savedStatus->setPixmap(m_savedStatusPixmap); m_savedtqStatus->setPixmap(m_savedStatusPixmap);
} else } else
m_savedStatus->clear(); m_savedtqStatus->clear();
} }
#include "basketstatusbar.moc" #include "basketstatusbar.moc"

@ -46,10 +46,10 @@ class BasketStatusBar : public TQObject
void setStatusBarHint(const TQString &hint); /// << Set a specific message or update if hint is empty 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 updateStatusBarHint(); /// << Display the current state message (dragging, editing) or reset the startsbar message
void postStatusbarMessage(const TQString &text); void postStatusbarMessage(const TQString &text);
void setSelectionStatus(const TQString &s); void setSelectiontqStatus(const TQString &s);
void setLockStatus(bool isLocked); void setLocktqStatus(bool isLocked);
void setupStatusBar(); void setupStatusBar();
void setUnsavedStatus(bool isUnsaved); void setUnsavedtqStatus(bool isUnsaved);
protected: protected:
KStatusBar *statusBar () const; KStatusBar *statusBar () const;
@ -59,10 +59,10 @@ class BasketStatusBar : public TQObject
private: private:
KStatusBar *m_bar; KStatusBar *m_bar;
KParts::StatusBarExtension *m_extension; KParts::StatusBarExtension *m_extension;
TQLabel *m_selectionStatus; TQLabel *m_selectiontqStatus;
ClickableLabel *m_lockStatus; ClickableLabel *m_locktqStatus;
TQLabel *m_basketStatus; TQLabel *m_baskettqStatus;
TQLabel *m_savedStatus; TQLabel *m_savedtqStatus;
TQPixmap m_savedStatusPixmap; TQPixmap m_savedStatusPixmap;
}; };

@ -1342,19 +1342,19 @@ void BNPView::notesStateChanged()
// Update statusbar message : // Update statusbar message :
if (currentBasket()->isLocked()) if (currentBasket()->isLocked())
setSelectionStatus(i18n("Locked")); setSelectiontqStatus(i18n("Locked"));
else if (!basket->isLoaded()) else if (!basket->isLoaded())
setSelectionStatus(i18n("Loading...")); setSelectiontqStatus(i18n("Loading..."));
else if (basket->count() == 0) else if (basket->count() == 0)
setSelectionStatus(i18n("No notes")); setSelectiontqStatus(i18n("No notes"));
else { else {
TQString count = i18n("%n note", "%n notes", basket->count() ); TQString count = i18n("%n note", "%n notes", basket->count() );
TQString selecteds = i18n("%n selected", "%n selected", basket->countSelecteds()); TQString selecteds = i18n("%n selected", "%n selected", basket->countSelecteds());
TQString showns = (currentDecoratedBasket()->filterData().isFiltering ? i18n("all matches") : i18n("no filter")); TQString showns = (currentDecoratedBasket()->filterData().isFiltering ? i18n("all matches") : i18n("no filter"));
if (basket->countFounds() != basket->count()) if (basket->countFounds() != basket->count())
showns = i18n("%n match", "%n matches", basket->countFounds()); showns = i18n("%n match", "%n matches", basket->countFounds());
setSelectionStatus( setSelectiontqStatus(
i18n("e.g. '18 notes, 10 matches, 5 selected'", "%1, %2, %3").arg(count, showns, selecteds) ); i18n("e.g. '18 notes, 10 matches, 5 selected'", "%1, %2, %3").tqarg(count, showns, selecteds) );
} }
// If we added a note that match the global filter, update the count number in the tree: // 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 " "<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 " "but you had a preview version of it, try to remove the "
"file %5basketui.rc</p>") "file %5basketui.rc</p>")
.arg(kapp->aboutData()->programName(), kapp->aboutData()->programName(), .tqarg(kapp->aboutData()->programName(), kapp->aboutData()->programName(),
stdDirs.saveLocation("data", "basket/")).arg(stdDirs.saveLocation("data", "basket/"), stdDirs.saveLocation("data", "basket/")), stdDirs.saveLocation("data", "basket/")).tqarg(stdDirs.saveLocation("data", "basket/"), stdDirs.saveLocation("data", "basket/")),
i18n("Ressource not Found"), KMessageBox::AllowLink ); i18n("Ressource not Found"), KMessageBox::AllowLink );
} }
if(!isPart()) if(!isPart())
@ -1701,13 +1701,13 @@ void BNPView::delBasket()
KMessageBox::createKMessageBox( KMessageBox::createKMessageBox(
dialog, TQMessageBox::Information, dialog, TQMessageBox::Information,
i18n("<qt>Do you really want to remove the basket <b>%1</b> and its contents?</qt>") i18n("<qt>Do you really want to remove the basket <b>%1</b> and its contents?</qt>")
.arg(Tools::textToHTMLWithoutP(basket->basketName())), .tqarg(Tools::textToHTMLWithoutP(basket->basketName())),
basketsList, /*ask=*/"", /*checkboxReturn=*/0, /*options=*/KMessageBox::Notify/*, const TQString &details=TQString()*/); basketsList, /*ask=*/"", /*checkboxReturn=*/0, /*options=*/KMessageBox::Notify/*, const TQString &details=TQString()*/);
#endif #endif
int really = KMessageBox::questionYesNo( this, int really = KMessageBox::questionYesNo( this,
i18n("<qt>Do you really want to remove the basket <b>%1</b> and its contents?</qt>") i18n("<qt>Do you really want to remove the basket <b>%1</b> and its contents?</qt>")
.arg(Tools::textToHTMLWithoutP(basket->basketName())), .tqarg(Tools::textToHTMLWithoutP(basket->basketName())),
i18n("Remove Basket") i18n("Remove Basket")
#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x #if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x
, KGuiItem(i18n("&Remove Basket"), "editdelete"), KStdGuiItem::cancel()); , KGuiItem(i18n("&Remove Basket"), "editdelete"), KStdGuiItem::cancel());
@ -1721,8 +1721,8 @@ void BNPView::delBasket()
TQStringList basketsList = listViewItemForBasket(basket)->childNamesTree(); TQStringList basketsList = listViewItemForBasket(basket)->childNamesTree();
if (basketsList.count() > 0) { if (basketsList.count() > 0) {
int deleteChilds = KMessageBox::questionYesNoList( this, int deleteChilds = KMessageBox::questionYesNoList( this,
i18n("<qt><b>%1</b> have the following children baskets.<br>Do you want to remove them too?</qt>") i18n("<qt><b>%1</b> have the following tqchildren baskets.<br>Do you want to remove them too?</qt>")
.arg(Tools::textToHTMLWithoutP(basket->basketName())), .tqarg(Tools::textToHTMLWithoutP(basket->basketName())),
basketsList, basketsList,
i18n("Remove Children Baskets") i18n("Remove Children Baskets")
#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x #if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x
@ -1808,7 +1808,7 @@ void BNPView::saveAsArchive()
int result = KMessageBox::questionYesNoCancel( int result = KMessageBox::questionYesNoCancel(
this, this,
"<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?") "<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?")
.arg(KURL(destination).fileName()), .tqarg(KURL(destination).fileName()),
i18n("Override File?"), i18n("Override File?"),
KGuiItem(i18n("&Override"), "filesave") KGuiItem(i18n("&Override"), "filesave")
); );
@ -1870,7 +1870,7 @@ void BNPView::isLockedChanged()
{ {
bool isLocked = currentBasket()->isLocked(); bool isLocked = currentBasket()->isLocked();
setLockStatus(isLocked); setLocktqStatus(isLocked);
// m_actLockBasket->setChecked(isLocked); // m_actLockBasket->setChecked(isLocked);
m_actPropBasket->setEnabled(!isLocked); m_actPropBasket->setEnabled(!isLocked);
@ -1955,7 +1955,7 @@ void BNPView::showPassiveDroppedDelayed()
TQPixmap contentsPixmap = NoteDrag::feedbackPixmap(m_passiveDroppedSelection); TQPixmap contentsPixmap = NoteDrag::feedbackPixmap(m_passiveDroppedSelection);
TQMimeSourceFactory::defaultFactory()->setPixmap("_passivepopup_image_", contentsPixmap); TQMimeSourceFactory::defaultFactory()->setPixmap("_passivepopup_image_", contentsPixmap);
m_passivePopup->setView( m_passivePopup->setView(
title.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), title.tqarg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
(contentsPixmap.isNull() ? "" : "<img src=\"_passivepopup_image_\">"), (contentsPixmap.isNull() ? "" : "<img src=\"_passivepopup_image_\">"),
kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true));
m_passivePopup->show(); 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 = new KPassivePopup(Settings::useSystray() ? (TQWidget*)Global::systemTray : (TQWidget*)this);
m_passivePopup->setView( m_passivePopup->setView(
TQString("<font color=red>%1</font>") TQString("<font color=red>%1</font>")
.arg(i18n("Basket <i>%1</i> is locked")) .tqarg(i18n("Basket <i>%1</i> is locked"))
.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), .tqarg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
message, message,
kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true));
m_passivePopup->show(); m_passivePopup->show();
@ -1992,7 +1992,7 @@ void BNPView::showPassiveContent(bool forceShow/* = false*/)
m_passivePopup->setView( m_passivePopup->setView(
"<qt>" + kapp->makeStdCaption( currentBasket()->isLocked() "<qt>" + kapp->makeStdCaption( currentBasket()->isLocked()
? TQString("%1 <font color=gray30>%2</font>") ? TQString("%1 <font color=gray30>%2</font>")
.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)")) .tqarg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)"))
: Tools::textToHTMLWithoutP(currentBasket()->basketName()) ), : Tools::textToHTMLWithoutP(currentBasket()->basketName()) ),
message, message,
kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true));
@ -2044,14 +2044,14 @@ void BNPView::updateStatusBarHint()
m_statusbar->updateStatusBarHint(); m_statusbar->updateStatusBarHint();
} }
void BNPView::setSelectionStatus(TQString s) void BNPView::setSelectiontqStatus(TQString s)
{ {
m_statusbar->setSelectionStatus(s); m_statusbar->setSelectiontqStatus(s);
} }
void BNPView::setLockStatus(bool isLocked) void BNPView::setLocktqStatus(bool isLocked)
{ {
m_statusbar->setLockStatus(isLocked); m_statusbar->setLocktqStatus(isLocked);
} }
void BNPView::postStatusbarMessage(const TQString& msg) void BNPView::postStatusbarMessage(const TQString& msg)
@ -2064,9 +2064,9 @@ void BNPView::setStatusBarHint(const TQString &hint)
m_statusbar->setStatusBarHint(hint); m_statusbar->setStatusBarHint(hint);
} }
void BNPView::setUnsavedStatus(bool isUnsaved) void BNPView::setUnsavedtqStatus(bool isUnsaved)
{ {
m_statusbar->setUnsavedStatus(isUnsaved); m_statusbar->setUnsavedtqStatus(isUnsaved);
} }
void BNPView::setActive(bool active) void BNPView::setActive(bool active)
@ -2299,7 +2299,7 @@ void BNPView::populateTagsMenu(KPopupMenu &menu, Note *referenceNote)
sequence = currentTag->shortcut().operator TQKeySequence(); sequence = currentTag->shortcut().operator TQKeySequence();
menu.insertItem(StateMenuItem::checkBoxIconSet( menu.insertItem(StateMenuItem::checkBoxIconSet(
(referenceNote ? referenceNote->hasTag(currentTag) : false), (referenceNote ? referenceNote->hasTag(currentTag) : false),
menu.colorGroup()), menu.tqcolorGroup()),
new StateMenuItem(currentState, sequence, true), new StateMenuItem(currentState, sequence, true),
i i
); );

@ -24,7 +24,7 @@
#include <klistview.h> #include <klistview.h>
#include <kxmlguiclient.h> #include <kxmlguiclient.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <tqsplitter.h> #include <tqsplitter.h>
#include <tqlistview.h> #include <tqlistview.h>
#include <dcopref.h> #include <dcopref.h>
@ -294,11 +294,11 @@ class BNPView : public TQSplitter, virtual public BasketDcopInterface
public slots: public slots:
void setCaption(TQString s); void setCaption(TQString s);
void updateStatusBarHint(); void updateStatusBarHint();
void setSelectionStatus(TQString s); void setSelectiontqStatus(TQString s);
void setLockStatus(bool isLocked); void setLocktqStatus(bool isLocked);
void postStatusbarMessage(const TQString&); void postStatusbarMessage(const TQString&);
void setStatusBarHint(const TQString&); void setStatusBarHint(const TQString&);
void setUnsavedStatus(bool isUnsaved); void setUnsavedtqStatus(bool isUnsaved);
void setActive(bool active = true); void setActive(bool active = true);
KActionCollection *actionCollection() { return m_actionCollection; }; KActionCollection *actionCollection() { return m_actionCollection; };

@ -24,7 +24,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <tqregexp.h> #include <tqregexp.h>
#include <textstream.h> #include <tqtextstream.h>
#include <cstdio> //popen, fread #include <cstdio> //popen, fread
#include <iostream> #include <iostream>
@ -82,7 +82,7 @@
"But, all is not lost! You could potentially help us fix the crash. " "But, all is not lost! You could potentially help us fix the crash. "
"Information describing the crash is below, so just click send, " "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" "or if you have time, write a brief description of how the crash happened first.\n\n"
"Many thanks." ).arg(kapp->aboutData()->programName()) + "\n\n"; "Many thanks." ).tqarg(kapp->aboutData()->programName()) + "\n\n";
body += "\n\n\n\n\n\n" + i18n( body += "\n\n\n\n\n\n" + i18n(
"The information below is to help the developers identify the problem, " "The information below is to help the developers identify the problem, "
"please do not modify it." ) + "\n\n\n\n"; "please do not modify it." ) + "\n\n\n\n";
@ -96,9 +96,9 @@
;// "TagLib: %2.%3.%4\n"; ;// "TagLib: %2.%3.%4\n";
/* body = body /* body = body
.arg( TAGLIB_MAJOR_VERSION ) .tqarg( TAGLIB_MAJOR_VERSION )
.arg( TAGLIB_MINOR_VERSION ) .tqarg( TAGLIB_MINOR_VERSION )
.arg( TAGLIB_PATCH_VERSION );*/ .tqarg( TAGLIB_PATCH_VERSION );*/
#ifdef NDEBUG #ifdef NDEBUG
body += "NDEBUG: true"; body += "NDEBUG: true";
@ -163,10 +163,10 @@
if( totalFrames > 0 ) { if( totalFrames > 0 ) {
const double validity = double(validFrames) / totalFrames; const double validity = double(validFrames) / totalFrames;
subject += TQString("[validity: %1]").arg( validity, 0, 'f', 2 ); subject += TQString("[validity: %1]").tqarg( validity, 0, 'f', 2 );
if( validity <= 0.5 ) useful = false; if( validity <= 0.5 ) useful = false;
} }
subject += TQString("[frames: %1]").arg( totalFrames, 3 /*padding*/ ); subject += TQString("[frames: %1]").tqarg( totalFrames, 3 /*padding*/ );
if( bt.find( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 ) if( bt.find( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 )
subject += "[line numbers]"; subject += "[line numbers]";
@ -174,7 +174,7 @@
else else
useful = false; useful = false;
// subject += TQString("[%1]").arg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) ); // subject += TQString("[%1]").tqarg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) );
// debug() << subject << endl; // debug() << subject << endl;
@ -206,7 +206,7 @@
std::cout << ("\n" + i18n( "%1 has crashed! We're sorry about this.\n\n" 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 " "But, all is not lost! Perhaps an upgrade is already available "
"which fixes the problem. Please check your distribution's software repository." ) "which fixes the problem. Please check your distribution's software repository." )
.arg(kapp->aboutData()->programName())).local8Bit().data() << std::endl; .tqarg(kapp->aboutData()->programName())).local8Bit().data() << std::endl;
} }
//_exit() exits immediately, otherwise this //_exit() exits immediately, otherwise this

@ -18,8 +18,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
#include <layout.h> #include <tqlayout.h>
#include <textbrowser.h> #include <tqtextbrowser.h>
#include <tqstring.h> #include <tqstring.h>
#include <tqevent.h> #include <tqevent.h>
#include <klocale.h> #include <klocale.h>
@ -33,19 +33,19 @@ DebugWindow::DebugWindow(TQWidget *parent, const char *name )
Global::debugWindow = this; Global::debugWindow = this;
setCaption(i18n("Debug Window")); setCaption(i18n("Debug Window"));
layout = new TQVBoxLayout(this); tqlayout = new TQVBoxLayout(this);
textBrowser = new TQTextBrowser(this); textBrowser = new TQTextBrowser(this);
textBrowser->setWordWrap(TQTextBrowser::NoWrap); textBrowser->setWordWrap(TQTextBrowser::NoWrap);
layout->addWidget(textBrowser); tqlayout->addWidget(textBrowser);
textBrowser->show(); textBrowser->show();
} }
DebugWindow::~DebugWindow() DebugWindow::~DebugWindow()
{ {
delete textBrowser; delete textBrowser;
delete layout; delete tqlayout;
} }
void DebugWindow::postMessage(const TQString msg) void DebugWindow::postMessage(const TQString msg)

@ -46,7 +46,7 @@ class DebugWindow : public TQWidget {
protected: protected:
virtual void closeEvent(TQCloseEvent *event); virtual void closeEvent(TQCloseEvent *event);
private: private:
TQVBoxLayout *layout; TQVBoxLayout *tqlayout;
TQTextBrowser *textBrowser; TQTextBrowser *textBrowser;
}; };

@ -25,7 +25,7 @@
#include <tqdir.h> #include <tqdir.h>
#include <tqhbox.h> #include <tqhbox.h>
#include <tqvbox.h> #include <tqvbox.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <klocale.h> #include <klocale.h>
#include <kconfig.h> #include <kconfig.h>
@ -61,10 +61,10 @@ ExporterDialog::ExporterDialog(Basket *basket, TQWidget *parent, const char *nam
showTile(true); showTile(true);
// Add a stretch at the bottom: // Add a stretch at the bottom:
// Duplicated code from AddBasketWizard::addStretch(TQWidget *parent): // Duplicated code from AddBasketWizard::addStretch(TQWidget *parent):
(new TQWidget(page))->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); (new TQWidget(page))->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
// Double the width, because the filename should be visible // Double the width, because the filename should be visible
TQSize size(sizeHint()); TQSize size(tqsizeHint());
resize(TQSize(size.width() * 2, size.height())); resize(TQSize(size.width() * 2, size.height()));
/* /*
========================== ==========================

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
#include <layout.h> #include <tqlayout.h>
//#include <ktoolbarbutton.h> //#include <ktoolbarbutton.h>
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
#include <tqlabel.h> #include <tqlabel.h>

@ -67,7 +67,7 @@ void FocusedTextEdit::paste()
// uint oldAutoFormating = autoFormatting(); // uint oldAutoFormating = autoFormatting();
// setAutoFormatting(AutoNone); // setAutoFormatting(AutoNone);
TQClipboard *clipboard = TQApplication::clipboard(); TQClipboard *clipboard = TQApplication::tqclipboard();
int paragraph; int paragraph;
int index; int index;
getCursorPosition(&paragraph, &index); getCursorPosition(&paragraph, &index);
@ -107,7 +107,7 @@ void FocusedTextEdit::paste()
*/ */
void FocusedTextEdit::adaptClipboardText(TQClipboard::Mode mode) void FocusedTextEdit::adaptClipboardText(TQClipboard::Mode mode)
{ {
TQClipboard *clipboard = TQApplication::clipboard(); TQClipboard *clipboard = TQApplication::tqclipboard();
if (!clipboard) if (!clipboard)
return; return;

@ -27,7 +27,7 @@
#include <kcombobox.h> #include <kcombobox.h>
#include <klineedit.h> #include <klineedit.h>
#include <kapplication.h> #include <kapplication.h>
#include <clipboard.h> #include <tqclipboard.h>
class FocusedTextEdit : public KTextEdit class FocusedTextEdit : public KTextEdit
{ {

@ -131,7 +131,7 @@ void FormatImporter::importBaskets()
if (folderName.startsWith("/")) { // It was a folder mirror: 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>" 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 " "<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>").arg(folderName), i18n("Folder Mirror Import"), "modifying one will not modify the other anymore as they are now separate entities.</p>").tqarg(folderName), i18n("Folder Mirror Import"),
"", KMessageBox::AllowLink); "", KMessageBox::AllowLink);
// Also modify folderName to be only the folder name and not the full path anymore: // Also modify folderName to be only the folder name and not the full path anymore:
TQString newFolderName = folderName; TQString newFolderName = folderName;
@ -259,7 +259,7 @@ TQDomElement FormatImporter::importBasket(const TQString &folderName)
"Name=%2\n" "Name=%2\n"
"Icon=%3\n" "Icon=%3\n"
"Encoding=UTF-8\n" "Encoding=UTF-8\n"
"Type=Application\n").arg(runCommand, title, icon.isEmpty() ? TQString("exec") : icon); "Type=Application\n").tqarg(runCommand, title, icon.isEmpty() ? TQString("exec") : icon);
TQString launcherFileName = Tools::fileNameForNewFile("launcher.desktop", Global::basketsFolder() + folderName /*+ "/"*/); TQString launcherFileName = Tools::fileNameForNewFile("launcher.desktop", Global::basketsFolder() + folderName /*+ "/"*/);
TQString launcherFullPath = Global::basketsFolder() + folderName /*+ "/"*/ + launcherFileName; TQString launcherFullPath = Global::basketsFolder() + folderName /*+ "/"*/ + launcherFileName;
TQFile file(launcherFullPath); TQFile file(launcherFullPath);

@ -63,7 +63,7 @@ HTMLExporter::HTMLExporter(Basket *basket)
int result = KMessageBox::questionYesNoCancel( int result = KMessageBox::questionYesNoCancel(
0, 0,
"<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?") "<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?")
.arg(KURL(destination).fileName()), .tqarg(KURL(destination).fileName()),
i18n("Override File?"), i18n("Override File?"),
KGuiItem(i18n("&Override"), "filesave") KGuiItem(i18n("&Override"), "filesave")
); );
@ -111,7 +111,7 @@ void HTMLExporter::prepareExport(Basket *basket, const TQString &fullPath)
withBasketTree = (item->firstChild() != 0); withBasketTree = (item->firstChild() != 0);
// Create and empty the files folder: // Create and empty the files folder:
TQString filesFolderPath = i18n("HTML export folder (files)", "%1_files").arg(filePath) + "/"; // eg.: "/home/seb/foo.html_files/" TQString filesFolderPath = i18n("HTML export folder (files)", "%1_files").tqarg(filePath) + "/"; // eg.: "/home/seb/foo.html_files/"
Tools::deleteRecursively(filesFolderPath); Tools::deleteRecursively(filesFolderPath);
TQDir dir; TQDir dir;
dir.mkdir(filesFolderPath); dir.mkdir(filesFolderPath);
@ -136,7 +136,7 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket)
} }
// Compute the absolute & relative paths for this basket: // Compute the absolute & relative paths for this basket:
filesFolderPath = i18n("HTML export folder (files)", "%1_files").arg(filePath) + "/"; filesFolderPath = i18n("HTML export folder (files)", "%1_files").tqarg(filePath) + "/";
if (isSubBasket) { if (isSubBasket) {
basketFilePath = basketsFolderPath + basket->folderName().left(basket->folderName().length() - 1) + ".html"; basketFilePath = basketsFolderPath + basket->folderName().left(basket->folderName().length() - 1) + ".html";
filesFolderName = "../"; filesFolderName = "../";
@ -145,7 +145,7 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket)
basketsFolderName = ""; basketsFolderName = "";
} else { } else {
basketFilePath = filePath; basketFilePath = filePath;
filesFolderName = i18n("HTML export folder (files)", "%1_files").arg(KURL(filePath).fileName()) + "/"; filesFolderName = i18n("HTML export folder (files)", "%1_files").tqarg(KURL(filePath).fileName()) + "/";
dataFolderName = filesFolderName + i18n("HTML export folder (data)", "data") + "/"; dataFolderName = filesFolderName + i18n("HTML export folder (data)", "data") + "/";
dataFolderPath = filesFolderPath + i18n("HTML export folder (data)", "data") + "/"; dataFolderPath = filesFolderPath + i18n("HTML export folder (data)", "data") + "/";
basketsFolderName = filesFolderName + i18n("HTML export folder (baskets)", "baskets") + "/"; 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! // TODO: Make sure only filtered notes are exported!
// if (decoration()->filterData().isFiltering) // if (decoration()->filterData().isFiltering)
// stream << // stream <<
// " <p>" << i18n("Notes matching the filter &quot;%1&quot;:").arg(Tools::textToHTMLWithoutP(decoration()->filterData().string)) << "</p>\n"; // " <p>" << i18n("Notes matching the filter &quot;%1&quot;:").tqarg(Tools::textToHTMLWithoutP(decoration()->filterData().string)) << "</p>\n";
stream << stream <<
" <div class=\"basketSurrounder\">\n"; " <div class=\"basketSurrounder\">\n";
@ -315,10 +315,10 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket)
" </div>\n"; " </div>\n";
stream << TQString( stream << TQString(
" </div>\n" " </div>\n"
" <p class=\"credits\">%1</p>\n").arg( " <p class=\"credits\">%1</p>\n").tqarg(
i18n("Made with %1, a KDE tool to take notes and keep information at hand.") i18n("Made with %1, a KDE tool to take notes and keep information at hand.")
.arg("<a href=\"http://basket.kde.org/\">%1</a> %2") .tqarg("<a href=\"http://basket.kde.org/\">%1</a> %2")
.arg(kapp->aboutData()->programName(), VERSION)); .tqarg(kapp->aboutData()->programName(), VERSION));
// Copy a transparent GIF image in the folder, needed for the JavaScript hack: // Copy a transparent GIF image in the folder, needed for the JavaScript hack:
TQString gifFileName = "spacer.gif"; TQString gifFileName = "spacer.gif";
@ -396,7 +396,7 @@ void HTMLExporter::exportNote(Note *note, int indent)
widthValue = 1; widthValue = 1;
if (widthValue > 100) if (widthValue > 100)
widthValue = 100; widthValue = 100;
width = TQString(" width=\"%1%\"").arg(TQString::number(widthValue)); width = TQString(" width=\"%1%\"").tqarg(TQString::number(widthValue));
} }
stream << spaces.fill(' ', indent) << "<td class=\"column\"" << width << ">\n"; stream << spaces.fill(' ', indent) << "<td class=\"column\"" << width << ">\n";

@ -22,7 +22,7 @@
#define HTMLEXPORTER_H #define HTMLEXPORTER_H
#include <tqstring.h> #include <tqstring.h>
#include <textstream.h> #include <tqtextstream.h>
class KProgress; class KProgress;

@ -26,7 +26,7 @@
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <klocale.h> #include <klocale.h>
#include <kcolordialog.h> #include <kcolordialog.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <kstdaccel.h> #include <kstdaccel.h>
#include <kcolordrag.h> #include <kcolordrag.h>
@ -68,7 +68,7 @@ KColorPopup::~KColorPopup()
#include <tqcursor.h> #include <tqcursor.h>
void KColorPopup::relayout() // FIXME: relayout should NOT redraw the pixmap! void KColorPopup::retqlayout() // FIXME: retqlayout should NOT redraw the pixmap!
{ {
int columnCount = m_selector->columnCount(); int columnCount = m_selector->columnCount();
int rowCount = m_selector->rowCount(); int rowCount = m_selector->rowCount();
@ -240,7 +240,7 @@ void KColorPopup::mouseMoveEvent(TQMouseEvent *event)
m_selectedColumn = (x - FRAME_WIDTH - MARGIN + 2) / (colorWidth + MARGIN); m_selectedColumn = (x - FRAME_WIDTH - MARGIN + 2) / (colorWidth + MARGIN);
m_selectedRow = (y - FRAME_WIDTH - MARGIN + 2) / (colorHeight + MARGIN); m_selectedRow = (y - FRAME_WIDTH - MARGIN + 2) / (colorHeight + MARGIN);
relayout(); retqlayout();
update(); update();
} }
@ -288,7 +288,7 @@ void KColorPopup::keyPressEvent(TQKeyEvent *event)
if (row != m_selectedRow || column != m_selectedColumn) { if (row != m_selectedRow || column != m_selectedColumn) {
m_selectedRow = row; m_selectedRow = row;
m_selectedColumn = column; m_selectedColumn = column;
relayout(); retqlayout();
update(); update();
} }
} }
@ -491,7 +491,7 @@ void KColorCombo2::newColorArray(int columnCount, int rowCount)
for (int i = 0; i < columnCount; ++i) for (int i = 0; i < columnCount; ++i)
m_colorArray[i] = new TQColor[rowCount]; m_colorArray[i] = new TQColor[rowCount];
m_popup->relayout(); m_popup->retqlayout();
} }
void KColorCombo2::setColorAt(int column, int row, const TQColor &color) void KColorCombo2::setColorAt(int column, int row, const TQColor &color)
@ -634,13 +634,13 @@ void KColorCombo2::popup()
TQPoint popupPoint = mapToGlobal(TQPoint(0, 0)); TQPoint popupPoint = mapToGlobal(TQPoint(0, 0));
int popupHeight = m_popup->sizeHint().height(); int popupHeight = m_popup->tqsizeHint().height();
if (popupPoint.y() + height() + popupHeight > desk.bottom()) if (popupPoint.y() + height() + popupHeight > desk.bottom())
popupPoint.setY(popupPoint.y() - popupHeight); popupPoint.setY(popupPoint.y() - popupHeight);
else else
popupPoint.setY(popupPoint.y() + height()); popupPoint.setY(popupPoint.y() + height());
int popupWidth = m_popup->sizeHint().width(); int popupWidth = m_popup->tqsizeHint().width();
if (popupPoint.x() + popupWidth > desk.right()) if (popupPoint.x() + popupWidth > desk.right())
popupPoint.setX(desk.right() - popupWidth); popupPoint.setX(desk.right() - popupWidth);
@ -654,7 +654,7 @@ void KColorCombo2::popup()
m_popup->move(popupPoint); m_popup->move(popupPoint);
//m_popup->setColor(m_color); //m_popup->setColor(m_color);
m_popup->doSelection(); m_popup->doSelection();
m_popup->relayout(); // FIXME: In aboutToShow() ? m_popup->retqlayout(); // FIXME: In aboutToShow() ?
#if 0 #if 0
//#ifndef TQT_NO_EFFECTS //#ifndef TQT_NO_EFFECTS
if (TQApplication::isEffectEnabled(UI_AnimateCombo)) { if (TQApplication::isEffectEnabled(UI_AnimateCombo)) {
@ -745,10 +745,10 @@ void KColorCombo2::keyPressEvent(TQKeyEvent *event)
if (KStdAccel::copy().contains(key)) { if (KStdAccel::copy().contains(key)) {
TQMimeSource *mime = new KColorDrag(effectiveColor()); TQMimeSource *mime = new KColorDrag(effectiveColor());
TQApplication::clipboard()->setData(mime, TQClipboard::Clipboard); TQApplication::tqclipboard()->setData(mime, TQClipboard::Clipboard);
} else if (KStdAccel::paste().contains(key)) { } else if (KStdAccel::paste().contains(key)) {
TQColor color; TQColor color;
KColorDrag::decode(TQApplication::clipboard()->data(TQClipboard::Clipboard), color); KColorDrag::decode(TQApplication::tqclipboard()->data(TQClipboard::Clipboard), color);
setColor(color); setColor(color);
} else } else
TQComboBox::keyPressEvent(event); 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: // Since the color-rectangle is the same height of the text, we should resize it if the font change:
updateComboBox(); updateComboBox();
TQComboBox::fontChange(oldFont); // To update geometry. TQComboBox::fontChange(oldFont); // To update tqgeometry.
} }
void KColorCombo2::virtual_hook(int /*id*/, void */*data*/) void KColorCombo2::virtual_hook(int /*id*/, void */*data*/)

@ -316,7 +316,7 @@ class KColorPopup : public TQWidget
public: public:
KColorPopup(KColorCombo2 *parent); KColorPopup(KColorCombo2 *parent);
~KColorPopup(); ~KColorPopup();
void relayout(); // updateGeometry() ?? void retqlayout(); // updateGeometry() ??
protected: protected:
void paintEvent(TQPaintEvent */*event*/); void paintEvent(TQPaintEvent */*event*/);
void mouseMoveEvent(TQMouseEvent *event); void mouseMoveEvent(TQMouseEvent *event);

@ -29,7 +29,7 @@
#include <klistview.h> #include <klistview.h>
#include <kdebug.h> #include <kdebug.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <klocale.h> #include <klocale.h>
#include <locale.h> #include <locale.h>
@ -139,7 +139,7 @@ void KGpgMe::init(gpgme_protocol_t proto)
err = gpgme_engine_check_version(proto); err = gpgme_engine_check_version(proto);
if(err) { if(err) {
KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2")
.arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); .tqarg(gpgme_strsource(err)).tqarg(gpgme_strerror(err)));
} }
} }
@ -221,7 +221,7 @@ KGpgKeyList KGpgMe::keys(bool privateKeys /* = false */) const
if(err) { if(err) {
KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2")
.arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); .tqarg(gpgme_strsource(err)).tqarg(gpgme_strerror(err)));
} }
else { else {
result = gpgme_op_keylist_result(m_ctx); 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); result = gpgme_op_encrypt_result(m_ctx);
if (result->invalid_recipients) { if (result->invalid_recipients) {
KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2")
.arg(i18n("That public key is not meant for encryption")) .tqarg(i18n("That public key is not meant for encryption"))
.arg(result->invalid_recipients->fpr)); .tqarg(result->invalid_recipients->fpr));
} }
else { else {
err = readToBuffer(out, outBuffer); 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) { if(err != GPG_ERR_NO_ERROR && err != GPG_ERR_CANCELED) {
KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2")
.arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); .tqarg(gpgme_strsource(err)).tqarg(gpgme_strerror(err)));
} }
if(err != GPG_ERR_NO_ERROR) if(err != GPG_ERR_NO_ERROR)
clearCache(); clearCache();
@ -306,8 +306,8 @@ bool KGpgMe::decrypt(const TQByteArray& inBuffer, TQByteArray* outBuffer)
result = gpgme_op_decrypt_result(m_ctx); result = gpgme_op_decrypt_result(m_ctx);
if(result->unsupported_algorithm) { if(result->unsupported_algorithm) {
KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2")
.arg(i18n("Unsupported algorithm")) .tqarg(i18n("Unsupported algorithm"))
.arg(result->unsupported_algorithm)); .tqarg(result->unsupported_algorithm));
} }
else { else {
err = readToBuffer(out, outBuffer); 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) { if(err != GPG_ERR_NO_ERROR && err != GPG_ERR_CANCELED) {
KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2") KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()), TQString("%1: %2")
.arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); .tqarg(gpgme_strsource(err)).tqarg(gpgme_strerror(err)));
} }
if(err != GPG_ERR_NO_ERROR) if(err != GPG_ERR_NO_ERROR)
clearCache(); clearCache();
@ -346,7 +346,7 @@ gpgme_error_t KGpgMe::readToBuffer(gpgme_data_t in, TQByteArray* outBuffer) cons
if(buf) { if(buf) {
while((ret = gpgme_data_read(in, buf, BUF_SIZE)) > 0) { while((ret = gpgme_data_read(in, buf, BUF_SIZE)) > 0) {
uint size = outBuffer->size(); uint size = outBuffer->size();
if(outBuffer->resize(size + ret)) if(outBuffer->tqresize(size + ret))
memcpy(outBuffer->data() + size, buf, ret); memcpy(outBuffer->data() + size, buf, ret);
} }
if(ret < 0) if(ret < 0)

@ -180,7 +180,7 @@ void KIconCanvas::slotLoadFiles()
// Calling kapp->processEvents() makes the iconview flicker like hell // Calling kapp->processEvents() makes the iconview flicker like hell
// (it's being repainted once for every new item), so we don't do this. // (it's being repainted once for every new item), so we don't do this.
// Instead, we directly repaint the progress bar without going through // Instead, we directly tqrepaint the progress bar without going through
// the event-loop. We do that just once for every 10th item so that // the event-loop. We do that just once for every 10th item so that
// the progress bar doesn't flicker in turn. (pfeiffer) // the progress bar doesn't flicker in turn. (pfeiffer)
// FIXME: TQt4 will have double buffering // FIXME: TQt4 will have double buffering

@ -86,7 +86,7 @@ KIconDialog::KIconDialog(TQWidget *parent, const char*)
d = new KIconDialogPrivate; d = new KIconDialogPrivate;
mpLoader = KGlobal::iconLoader(); mpLoader = KGlobal::iconLoader();
init(); init();
resize(minimumSize()); resize(tqminimumSize());
} }
KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *parent, 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 ); d->extendedContext = static_cast<ExtendedContext>( ( context == KIcon::Any ) ? ALL : context + 1 );
// We cannot change layout because it is protected ;-( // We cannot change tqlayout because it is protected ;-(
// FIXME: TQt4 we will be able to inherit from both TQDialog and our GUI // FIXME: TQt4 we will be able to inherit from both TQDialog and our GUI
d->ui->listBox->setEnabled(!lockContext); d->ui->listBox->setEnabled(!lockContext);
d->ui->browseButton->setEnabled(!lockBrowse); d->ui->browseButton->setEnabled(!lockBrowse);
@ -277,7 +277,7 @@ void KIconDialog::setCustomLocation( const TQString& location )
if (location.isEmpty()) if (location.isEmpty())
{ {
mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::tqfromLatin1("*.png"));
} else { } else {
mFileList = mpLoader->queryIconsByDir(location); mFileList = mpLoader->queryIconsByDir(location);
} }
@ -304,7 +304,7 @@ void KIconDialog::showDialog()
{ {
d->custom = TQString(); d->custom = TQString();
// Make it so minimumSize returns correct value // Make it so tqminimumSize returns correct value
d->ui->filterLabel->hide(); d->ui->filterLabel->hide();
d->ui->searchLine->hide(); d->ui->searchLine->hide();
d->ui->progressBar->show(); d->ui->progressBar->show();
@ -313,7 +313,7 @@ void KIconDialog::showDialog()
show(); show();
// FIXME: this should be before show() but it doesn't work ;-( // FIXME: this should be before show() but it doesn't work ;-(
resize(minimumSize()); resize(tqminimumSize());
showIcons(); showIcons();
} }

@ -21,7 +21,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
@ -54,7 +54,7 @@
<property name="name"> <property name="name">
<cstring>iconCanvas</cstring> <cstring>iconCanvas</cstring>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>370</width> <width>370</width>
<height>290</height> <height>290</height>
@ -72,7 +72,7 @@
</widget> </widget>
<widget class="TQLayoutWidget" row="1" column="1"> <widget class="TQLayoutWidget" row="1" column="1">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>tqlayout4</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
@ -83,7 +83,7 @@
</property> </property>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>tqlayout3</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">

@ -27,7 +27,7 @@
#include <klocale.h> #include <klocale.h>
#include <kdebug.h> #include <kdebug.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <layout.h> #include <tqlayout.h>
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
#include <kpushbutton.h> #include <kpushbutton.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
@ -36,8 +36,8 @@
#include <tqvgroupbox.h> #include <tqvgroupbox.h>
#include <kguiitem.h> #include <kguiitem.h>
#include <tqpopupmenu.h> #include <tqpopupmenu.h>
#include <textedit.h> #include <tqtextedit.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <kdialogbase.h> #include <kdialogbase.h>
#include <tqhttp.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) : TQWidget(0, "LikeBackBar", TQt::WX11BypassWM | TQt::WStyle_NoBorder | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop | TQt::WStyle_NoBorder | TQt::TQt::WGroupLeader)
, m_likeBack(likeBack) , m_likeBack(likeBack)
{ {
TQHBoxLayout *layout = new TQHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small); TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small);
TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", 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->setTextLabel("<p>" + i18n("Send application developers a comment about something you like"));
m_likeButton->setAutoRaise(true); m_likeButton->setAutoRaise(true);
connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedLike()) ); connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedLike()) );
layout->add(m_likeButton); tqlayout->add(m_likeButton);
m_dislikeButton = new TQToolButton(this, "likeback_dislike"); m_dislikeButton = new TQToolButton(this, "likeback_dislike");
m_dislikeButton->setIconSet(dislikeIconSet); m_dislikeButton->setIconSet(dislikeIconSet);
m_dislikeButton->setTextLabel("<p>" + i18n("Send application developers a comment about something you dislike")); m_dislikeButton->setTextLabel("<p>" + i18n("Send application developers a comment about something you dislike"));
m_dislikeButton->setAutoRaise(true); m_dislikeButton->setAutoRaise(true);
connect( m_dislikeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedDislike()) ); connect( m_dislikeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedDislike()) );
layout->add(m_dislikeButton); tqlayout->add(m_dislikeButton);
m_bugButton = new TQToolButton(this, "likeback_bug"); m_bugButton = new TQToolButton(this, "likeback_bug");
m_bugButton->setIconSet(bugIconSet); m_bugButton->setIconSet(bugIconSet);
m_bugButton->setTextLabel("<p>" + i18n("Send application developers a comment about an improper behavior of the application")); m_bugButton->setTextLabel("<p>" + i18n("Send application developers a comment about an improper behavior of the application"));
m_bugButton->setAutoRaise(true); m_bugButton->setAutoRaise(true);
connect( m_bugButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedBug()) ); connect( m_bugButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedBug()) );
layout->add(m_bugButton); tqlayout->add(m_bugButton);
m_featureButton = new TQToolButton(this, "likeback_feature"); m_featureButton = new TQToolButton(this, "likeback_feature");
m_featureButton->setIconSet(featureIconSet); m_featureButton->setIconSet(featureIconSet);
m_featureButton->setTextLabel("<p>" + i18n("Send application developers a comment about a new feature you desire")); m_featureButton->setTextLabel("<p>" + i18n("Send application developers a comment about a new feature you desire"));
m_featureButton->setAutoRaise(true); m_featureButton->setAutoRaise(true);
connect( m_featureButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedFeature()) ); connect( m_featureButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickedFeature()) );
layout->add(m_featureButton); tqlayout->add(m_featureButton);
connect( &m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoMove()) ); 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: // Initialize the button-bar:
d->bar = new LikeBackBar(this); d->bar = new LikeBackBar(this);
d->bar->resize(d->bar->sizeHint()); d->bar->resize(d->bar->tqsizeHint());
// Show the information message if it is the first time, and if the button-bar is shown: // Show the information message if it is the first time, and if the button-bar is shown:
static const char *messageShown = "LikeBack_starting_information"; static const char *messageShown = "LikeBack_starting_information";
@ -430,7 +430,7 @@ void LikeBack::showInformationMessage()
"<p><b>" + (isDevelopmentVersion(d->aboutData->version()) ? "<p><b>" + (isDevelopmentVersion(d->aboutData->version()) ?
i18n("Welcome to this testing version of %1.") : i18n("Welcome to this testing version of %1.") :
i18n("Welcome to %1.") i18n("Welcome to %1.")
).arg(d->aboutData->programName()) + "</b></p>" ).tqarg(d->aboutData->programName()) + "</b></p>"
"<p>" + i18n("To help us improve it, your comments are important.") + "</p>" "<p>" + i18n("To help us improve it, your comments are important.") + "</p>"
"<p>" + "<p>" +
((buttons & LikeBack::Like) && (buttons & LikeBack::Dislike) ? ((buttons & LikeBack::Like) && (buttons & LikeBack::Dislike) ?
@ -583,7 +583,7 @@ bool LikeBack::isDevelopmentVersion(const TQString &version)
if (m_process) if (m_process)
return; return;
m_process = new KProcess(); m_process = new KProcess();
*m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount"); *m_process << TQString::tqfromLatin1("kcmshell") << TQString::tqfromLatin1("kcm_useraccount");
connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(fetchUserEmail()) ); connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(fetchUserEmail()) );
if (!m_process->start()) { if (!m_process->start()) {
kdDebug() << "Couldn't start kcmshell.." << endl; kdDebug() << "Couldn't start kcmshell.." << endl;
@ -604,23 +604,23 @@ void LikeBack::fetchUserEmail()
// m_configureEmail->setEnabled(true); // m_configureEmail->setEnabled(true);
// ### KDE4: why oh why is KEmailSettings in kio? // ### KDE4: why oh why is KEmailSettings in kio?
KConfig emailConf( TQString::fromLatin1("emaildefaults") ); KConfig emailConf( TQString::tqfromLatin1("emaildefaults") );
// find out the default profile // find out the default profile
emailConf.setGroup(TQString::fromLatin1("Defaults")); emailConf.setGroup(TQString::tqfromLatin1("Defaults"));
TQString profile = TQString::fromLatin1("PROFILE_"); TQString profile = TQString::tqfromLatin1("PROFILE_");
profile += emailConf.readEntry(TQString::fromLatin1("Profile"), TQString::fromLatin1("Default")); profile += emailConf.readEntry(TQString::tqfromLatin1("Profile"), TQString::tqfromLatin1("Default"));
emailConf.setGroup(profile); emailConf.setGroup(profile);
TQString fromaddr = emailConf.readEntry(TQString::fromLatin1("EmailAddress")); TQString fromaddr = emailConf.readEntry(TQString::tqfromLatin1("EmailAddress"));
if (fromaddr.isEmpty()) { if (fromaddr.isEmpty()) {
struct passwd *p; struct passwd *p;
p = getpwuid(getuid()); p = getpwuid(getuid());
d->fetchedEmail = TQString::fromLatin1(p->pw_name); d->fetchedEmail = TQString::tqfromLatin1(p->pw_name);
} else { } else {
TQString name = emailConf.readEntry(TQString::fromLatin1("FullName")); TQString name = emailConf.readEntry(TQString::tqfromLatin1("FullName"));
if (!name.isEmpty()) if (!name.isEmpty())
d->fetchedEmail = /*name + TQString::fromLatin1(" <") +*/ fromaddr /*+ TQString::fromLatin1(">")*/; d->fetchedEmail = /*name + TQString::tqfromLatin1(" <") +*/ fromaddr /*+ TQString::tqfromLatin1(">")*/;
} }
// m_from->setText( fromaddr ); // 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); TQPixmap likePixmap = kapp->iconLoader()->loadIcon("likeback_like", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
TQLabel *likeIcon = new TQLabel(buttons); TQLabel *likeIcon = new TQLabel(buttons);
likeIcon->setPixmap(likePixmap); likeIcon->setPixmap(likePixmap);
likeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); likeIcon->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
TQRadioButton *likeButton = new TQRadioButton(i18n("Something you &like"), buttons); TQRadioButton *likeButton = new TQRadioButton(i18n("Something you &like"), buttons);
buttonsGrid->addWidget(likeIcon, /*row=*/0, /*column=*/0); buttonsGrid->addWidget(likeIcon, /*row=*/0, /*column=*/0);
buttonsGrid->addWidget(likeButton, /*row=*/0, /*column=*/1); 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); TQPixmap dislikePixmap = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
TQLabel *dislikeIcon = new TQLabel(buttons); TQLabel *dislikeIcon = new TQLabel(buttons);
dislikeIcon->setPixmap(dislikePixmap); dislikeIcon->setPixmap(dislikePixmap);
dislikeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); dislikeIcon->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
TQRadioButton *dislikeButton = new TQRadioButton(i18n("Something you &dislike"), buttons); TQRadioButton *dislikeButton = new TQRadioButton(i18n("Something you &dislike"), buttons);
buttonsGrid->addWidget(dislikeIcon, /*row=*/1, /*column=*/0); buttonsGrid->addWidget(dislikeIcon, /*row=*/1, /*column=*/0);
buttonsGrid->addWidget(dislikeButton, /*row=*/1, /*column=*/1); 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); TQPixmap bugPixmap = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
TQLabel *bugIcon = new TQLabel(buttons); TQLabel *bugIcon = new TQLabel(buttons);
bugIcon->setPixmap(bugPixmap); bugIcon->setPixmap(bugPixmap);
bugIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); bugIcon->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
TQRadioButton *bugButton = new TQRadioButton(i18n("An improper &behavior of this application"), buttons); TQRadioButton *bugButton = new TQRadioButton(i18n("An improper &behavior of this application"), buttons);
buttonsGrid->addWidget(bugIcon, /*row=*/2, /*column=*/0); buttonsGrid->addWidget(bugIcon, /*row=*/2, /*column=*/0);
buttonsGrid->addWidget(bugButton, /*row=*/2, /*column=*/1); 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); TQPixmap featurePixmap = kapp->iconLoader()->loadIcon("likeback_feature", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
TQLabel *featureIcon = new TQLabel(buttons); TQLabel *featureIcon = new TQLabel(buttons);
featureIcon->setPixmap(featurePixmap); featureIcon->setPixmap(featurePixmap);
featureIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); featureIcon->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
TQRadioButton *featureButton = new TQRadioButton(i18n("A new &feature you desire"), buttons); TQRadioButton *featureButton = new TQRadioButton(i18n("A new &feature you desire"), buttons);
buttonsGrid->addWidget(featureIcon, /*row=*/3, /*column=*/0); buttonsGrid->addWidget(featureIcon, /*row=*/3, /*column=*/0);
buttonsGrid->addWidget(featureButton, /*row=*/3, /*column=*/1); 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")); setButtonGuiItem(Default, KGuiItem(i18n("&Email Address..."), "mail_generic"));
resize(TQSize(kapp->desktop()->width() * 1 / 2, kapp->desktop()->height() * 3 / 5).expandedTo(sizeHint())); resize(TQSize(kapp->desktop()->width() * 1 / 2, kapp->desktop()->height() * 3 / 5).expandedTo(tqsizeHint()));
TQAction *sendShortcut = new TQAction(this); TQAction *sendShortcut = new TQAction(this);
sendShortcut->setAccel(TQString("Ctrl+Return")); sendShortcut->setAccel(TQString("Ctrl+Return"));
@ -740,7 +740,7 @@ LikeBackDialog::~LikeBackDialog()
TQString LikeBackDialog::introductionText() TQString LikeBackDialog::introductionText()
{ {
TQString text = "<p>" + i18n("Please provide a brief description of your opinion of %1.").arg(m_likeBack->aboutData()->programName()) + " "; TQString text = "<p>" + i18n("Please provide a brief description of your opinion of %1.").tqarg(m_likeBack->aboutData()->programName()) + " ";
TQString languagesMessage = ""; TQString languagesMessage = "";
if (!m_likeBack->acceptedLocales().isEmpty() && !m_likeBack->acceptedLanguagesMessage().isEmpty()) { if (!m_likeBack->acceptedLocales().isEmpty() && !m_likeBack->acceptedLanguagesMessage().isEmpty()) {
@ -760,7 +760,7 @@ TQString LikeBackDialog::introductionText()
// TODO: Replace the URL with a localized one: // TODO: Replace the URL with a localized one:
text += languagesMessage + " " + text += languagesMessage + " " +
i18n("You may be able to use an <a href=\"%1\">online translation tool</a>.") i18n("You may be able to use an <a href=\"%1\">online translation tool</a>.")
.arg("http://www.google.com/language_tools?hl=" + KGlobal::locale()->language()) .tqarg("http://www.google.com/language_tools?hl=" + KGlobal::locale()->language())
+ " "; + " ";
// If both "I Like" and "I Dislike" buttons are shown and one is clicked: // If both "I Like" and "I Dislike" buttons are shown and one is clicked:

@ -20,7 +20,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <kurl.h> #include <kurl.h>
#include <layout.h> #include <tqlayout.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <tqcursor.h> #include <tqcursor.h>
#include <klocale.h> #include <klocale.h>
@ -132,7 +132,7 @@ LinkLook* LinkLook::lookForURL(const KURL &url)
TQString LinkLook::toCSS(const TQString &cssClass, const TQColor &defaultTextColor) const TQString LinkLook::toCSS(const TQString &cssClass, const TQColor &defaultTextColor) const
{ {
// Set the link class: // Set the link class:
TQString css = TQString(" .%1 a { display: block; width: 100%;").arg(cssClass); TQString css = TQString(" .%1 a { display: block; width: 100%;").tqarg(cssClass);
if (underlineOutside()) if (underlineOutside())
css += " text-decoration: underline;"; css += " text-decoration: underline;";
else else
@ -142,7 +142,7 @@ TQString LinkLook::toCSS(const TQString &cssClass, const TQColor &defaultTextCol
if (m_bold == true) if (m_bold == true)
css += " font-weight: bold;"; css += " font-weight: bold;";
TQColor textColor = (color().isValid() || m_useLinkColor ? effectiveColor() : defaultTextColor); TQColor textColor = (color().isValid() || m_useLinkColor ? effectiveColor() : defaultTextColor);
css += TQString(" color: %1; }\n").arg(textColor.name()); css += TQString(" color: %1; }\n").tqarg(textColor.name());
// Set the hover state class: // Set the hover state class:
TQString hover; TQString hover;
@ -153,12 +153,12 @@ TQString LinkLook::toCSS(const TQString &cssClass, const TQColor &defaultTextCol
if (effectiveHoverColor() != effectiveColor()) { if (effectiveHoverColor() != effectiveColor()) {
if (!hover.isEmpty()) if (!hover.isEmpty())
hover += " "; hover += " ";
hover += TQString("color: %4;").arg(effectiveHoverColor().name()); hover += TQString("color: %4;").tqarg(effectiveHoverColor().name());
} }
// But include it only if it contain a different style than non-hover state: // But include it only if it contain a different style than non-hover state:
if (!hover.isEmpty()) if (!hover.isEmpty())
css += TQString(" .%1 a:hover { %2 }\n").arg(cssClass, hover); css += TQString(" .%1 a:hover { %2 }\n").tqarg(cssClass, hover);
return css; return css;
} }
@ -231,7 +231,7 @@ void LinkLabel::setLook(LinkLook *look) // FIXME: called externaly (so, without
font.setUnderline(look->underlineOutside()); font.setUnderline(look->underlineOutside());
font.setItalic(look->italic()); font.setItalic(look->italic());
m_title->setFont(font); m_title->setFont(font);
m_title->setPaletteForegroundColor( m_isSelected ? KApplication::palette().active().highlightedText() : look->effectiveColor() ); m_title->setPaletteForegroundColor( m_isSelected ? KApplication::tqpalette().active().highlightedText() : look->effectiveColor() );
m_icon->setShown( m_icon->pixmap() && ! m_icon->pixmap()->isNull() ); m_icon->setShown( m_icon->pixmap() && ! m_icon->pixmap()->isNull() );
@ -246,7 +246,7 @@ void LinkLabel::setAlign(int hAlign, int vAlign)
if (!m_look) if (!m_look)
return; return;
// Define alignment flags : // Define tqalignment flags :
//FIXME TODO: Use directly flags ! //FIXME TODO: Use directly flags !
int hFlag, vFlag, wBreak; int hFlag, vFlag, wBreak;
switch (hAlign) { switch (hAlign) {
@ -269,19 +269,19 @@ void LinkLabel::setAlign(int hAlign, int vAlign)
m_layout->remove(m_title); m_layout->remove(m_title);
m_layout->removeItem(m_spacer2); m_layout->removeItem(m_spacer2);
// Otherwise, minimumSize will be incoherent (last size ? ) // Otherwise, tqminimumSize will be incoherent (last size ? )
m_layout->setResizeMode(TQLayout::Minimum); m_layout->setResizeMode(TQLayout::Minimum);
// And re-populate the widget with the appropriates things and order // And re-populate the widget with the appropriates things and order
bool addSpacers = hAlign == 1; bool addSpacers = hAlign == 1;
m_layout->setDirection(TQBoxLayout::LeftToRight); m_layout->setDirection(TQBoxLayout::LeftToRight);
//m_title->setSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Maximum/*Expanding*/, 0, 0, false) ); //m_title->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Maximum/*Expanding*/, 0, 0, false) );
m_icon->setSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred/*Expanding*/, 0, 0, false) ); m_icon->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred/*Expanding*/, 0, 0, false) );
m_spacer1->changeSize( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Preferred/*Expanding*/ ); m_spacer1->changeSize( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Preferred/*Expanding*/ );
m_spacer2->changeSize( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Preferred/*Expanding*/ ); m_spacer2->changeSize( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Preferred/*Expanding*/ );
m_icon->setAlignment( hFlag | vFlag ); m_icon->tqsetAlignment( hFlag | vFlag );
m_title->setAlignment( hFlag | vFlag | wBreak ); m_title->tqsetAlignment( hFlag | vFlag | wBreak );
if ( addSpacers && (vAlign != 0) || if ( addSpacers && (vAlign != 0) ||
(m_title->text().isEmpty() && hAlign == 2) ) (m_title->text().isEmpty() && hAlign == 2) )
m_layout->addItem(m_spacer1); m_layout->addItem(m_spacer1);
@ -323,7 +323,7 @@ void LinkLabel::setSelected(bool selected)
{ {
m_isSelected = selected; m_isSelected = selected;
if (selected) if (selected)
m_title->setPaletteForegroundColor(KApplication::palette().active().highlightedText()); m_title->setPaletteForegroundColor(KApplication::tqpalette().active().highlightedText());
else if (m_isHovered) else if (m_isHovered)
m_title->setPaletteForegroundColor(m_look->effectiveHoverColor()); m_title->setPaletteForegroundColor(m_look->effectiveHoverColor());
else else
@ -392,7 +392,7 @@ void LinkDisplay::setLink(const TQString &title, const TQString &icon, const TQP
m_font = font; m_font = font;
// "Constants": // "Constants":
int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin);
int LINK_MARGIN = BUTTON_MARGIN + 2; int LINK_MARGIN = BUTTON_MARGIN + 2;
// Recompute m_minWidth: // Recompute m_minWidth:
@ -422,15 +422,15 @@ void LinkDisplay::setWidth(int width)
/** Paint on @p painter /** Paint on @p painter
* in (@p x, @p y, @p width, @p height) * in (@p x, @p y, @p width, @p height)
* using @p colorGroup for the button drawing (if @p isHovered) * using @p tqcolorGroup for the button drawing (if @p isHovered)
* and the LinkLook color() for the text, * 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 colorGroup.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().
* It will draw the button if @p isIconButtonHovered. * It will draw the button if @p isIconButtonHovered.
*/ */
void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, const TQColorGroup &colorGroup, void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, const TQColorGroup &tqcolorGroup,
bool isDefaultColor, bool isSelected, bool isHovered, bool isIconButtonHovered) const bool isDefaultColor, bool isSelected, bool isHovered, bool isIconButtonHovered) const
{ {
int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin);
int LINK_MARGIN = BUTTON_MARGIN + 2; int LINK_MARGIN = BUTTON_MARGIN + 2;
TQPixmap pixmap; 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: // Draw the button (if any) and the icon:
if (isHovered) if (isHovered)
kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonCommand, painter, TQRect(-1, -1, iconPreviewWidth + 2*BUTTON_MARGIN, height + 2), kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonCommand, painter, TQRect(-1, -1, iconPreviewWidth + 2*BUTTON_MARGIN, height + 2),
colorGroup, TQStyle::Style_Enabled | (isIconButtonHovered ? TQStyle::Style_MouseOver : 0)); tqcolorGroup, TQStyle::Style_Enabled | (isIconButtonHovered ? TQStyle::Style_MouseOver : 0));
painter->drawPixmap(x + BUTTON_MARGIN - 1 + pixmapX, y + pixmapY, pixmap); painter->drawPixmap(x + BUTTON_MARGIN - 1 + pixmapX, y + pixmapY, pixmap);
// Figure out the text color: // 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) else if (isIconButtonHovered)
painter->setPen(m_look->effectiveHoverColor()); 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: 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(colorGroup.text()); painter->setPen(tqcolorGroup.text());
else else
painter->setPen(m_look->effectiveColor()); painter->setPen(m_look->effectiveColor());
// Draw the text: // 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); TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak, m_title);
} }
TQPixmap LinkDisplay::feedbackPixmap(int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor) TQPixmap LinkDisplay::feedbackPixmap(int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor)
{ {
int theWidth = TQMIN(width, maxWidth()); int theWidth = TQMIN(width, maxWidth());
int theHeight = TQMIN(height, heightForWidth(theWidth)); int theHeight = TQMIN(height, heightForWidth(theWidth));
TQPixmap pixmap(theWidth, theHeight); TQPixmap pixmap(theWidth, theHeight);
pixmap.fill(colorGroup.background()); pixmap.fill(tqcolorGroup.background());
TQPainter painter(&pixmap); TQPainter painter(&pixmap);
paint(&painter, 0, 0, theWidth, theHeight, colorGroup, isDefaultColor, paint(&painter, 0, 0, theWidth, theHeight, tqcolorGroup, isDefaultColor,
/*isSelected=*/false, /*isHovered=*/false, /*isIconButtonHovered=*/false); /*isSelected=*/false, /*isHovered=*/false, /*isIconButtonHovered=*/false);
painter.end(); painter.end();
return pixmap; return pixmap;
@ -483,7 +483,7 @@ TQPixmap LinkDisplay::feedbackPixmap(int width, int height, const TQColorGroup &
bool LinkDisplay::iconButtonAt(const TQPoint &pos) const bool LinkDisplay::iconButtonAt(const TQPoint &pos) const
{ {
int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin);
// int LINK_MARGIN = BUTTON_MARGIN + 2; // int LINK_MARGIN = BUTTON_MARGIN + 2;
int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); 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 TQRect LinkDisplay::iconButtonRect() const
{ {
int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin);
// int LINK_MARGIN = BUTTON_MARGIN + 2; // int LINK_MARGIN = BUTTON_MARGIN + 2;
int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); 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 LinkDisplay::heightForWidth(int width) const
{ {
int BUTTON_MARGIN = kapp->tqstyle().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin);
int LINK_MARGIN = BUTTON_MARGIN + 2; int LINK_MARGIN = BUTTON_MARGIN + 2;
int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); 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)); 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; TQString fullPath = exporter->iconsFolderPath + fileName;
m_preview.save(fullPath, "PNG"); m_preview.save(fullPath, "PNG");
linkIcon = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">") linkIcon = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">")
.arg(exporter->iconsFolderName + fileName, TQString::number(m_preview.width()), TQString::number(m_preview.height())); .tqarg(exporter->iconsFolderName + fileName, TQString::number(m_preview.width()), TQString::number(m_preview.height()));
} else { } else {
linkIcon = exporter->iconsFolderName + exporter->copyIcon(m_icon, m_look->iconSize()); linkIcon = exporter->iconsFolderName + exporter->copyIcon(m_icon, m_look->iconSize());
linkIcon = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">") linkIcon = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">")
.arg(linkIcon, TQString::number(m_look->iconSize()), TQString::number(m_look->iconSize())); .tqarg(linkIcon, TQString::number(m_look->iconSize()), TQString::number(m_look->iconSize()));
} }
TQString linkTitle = Tools::textToHTMLWithoutP(title.isEmpty() ? m_title : title); TQString linkTitle = Tools::textToHTMLWithoutP(title.isEmpty() ? m_title : title);
return TQString("<a href=\"%1\">%2 %3</a>").arg(url.prettyURL(), linkIcon, linkTitle); return TQString("<a href=\"%1\">%2 %3</a>").tqarg(url.prettyURL(), linkIcon, linkTitle);
} }
/** LinkLookEditWidget **/ /** LinkLookEditWidget **/
@ -559,15 +559,15 @@ LinkLookEditWidget::LinkLookEditWidget(KCModule *module, const TQString exTitle,
: TQWidget(parent, name, fl) : TQWidget(parent, name, fl)
{ {
TQLabel *label; TQLabel *label;
TQVBoxLayout *layout = new TQVBoxLayout(this, KDialogBase::marginHint(), KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialogBase::marginHint(), KDialogBase::spacingHint());
m_italic = new TQCheckBox(i18n("I&talic"), this); m_italic = new TQCheckBox(i18n("I&talic"), this);
layout->addWidget(m_italic); tqlayout->addWidget(m_italic);
m_bold = new TQCheckBox(i18n("&Bold"), this); m_bold = new TQCheckBox(i18n("&Bold"), this);
layout->addWidget(m_bold); tqlayout->addWidget(m_bold);
TQGridLayout *gl = new TQGridLayout(layout, /*rows=*//*(look->canPreview() ? 5 : 4)*/5, /*columns=*//*3*/4); TQGridLayout *gl = new TQGridLayout(tqlayout, /*rows=*//*(look->canPreview() ? 5 : 4)*/5, /*columns=*//*3*/4);
gl->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding), 1, /*2*/3); gl->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding), 1, /*2*/3);
m_underlining = new TQComboBox(false, this); 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, " "<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>") "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... // TODO: Note: you can resize down maximum size of images...
.arg(kapp->aboutData()->programName(), kapp->aboutData()->programName()), .tqarg(kapp->aboutData()->programName(), kapp->aboutData()->programName()),
this); this);
gl->addWidget(m_label, 4, 0); gl->addWidget(m_label, 4, 0);
gl->addWidget(m_preview, 4, 1); gl->addWidget(m_preview, 4, 1);
@ -623,9 +623,9 @@ LinkLookEditWidget::LinkLookEditWidget(KCModule *module, const TQString exTitle,
TQGroupBox *gb = new TQHGroupBox(i18n("Example"), this); TQGroupBox *gb = new TQHGroupBox(i18n("Example"), this);
m_exLook = new LinkLook; m_exLook = new LinkLook;
m_example = new LinkLabel(exTitle, exIcon, m_exLook, 1, 1, gb); m_example = new LinkLabel(exTitle, exIcon, m_exLook, 1, 1, gb);
m_example->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_example->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_example->setCursor(TQCursor(TQt::PointingHandCursor)); m_example->setCursor(TQCursor(TQt::PointingHandCursor));
layout->addWidget(gb); tqlayout->addWidget(gb);
m_exTitle = exTitle; m_exTitle = exTitle;
m_exIcon = exIcon; m_exIcon = exIcon;

@ -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 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. int height() const { return m_height; } /// << @return the height if the link after having set it a width.
// And finaly, use it: // And finaly, use it:
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! 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 &colorGroup, bool isDefaultColor); /// << @return the pixmap to put under the cursor while dragging this object. TQPixmap feedbackPixmap(int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor); /// << @return the pixmap to put under the cursor while dragging this object.
// Eventually get some information about the link display: // 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. 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. TQRect iconButtonRect() const; /// << @return the rectangle of the icon button.

@ -19,7 +19,7 @@
***************************************************************************/ ***************************************************************************/
#include <tqtabwidget.h> #include <tqtabwidget.h>
#include <layout.h> #include <tqlayout.h>
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqcursor.h> #include <tqcursor.h>
#include <tqwhatsthis.h> #include <tqwhatsthis.h>
@ -111,7 +111,7 @@ MainWindow::MainWindow(TQWidget *parent, const char *name)
statusBar()->show(); statusBar()->show();
statusBar()->setSizeGripEnabled(true); statusBar()->setSizeGripEnabled(true);
setAutoSaveSettings(/*groupName=*/TQString::fromLatin1("MainWindow"), /*saveWindowSize=*//*FIXME:false:Why was it false??*/true); setAutoSaveSettings(/*groupName=*/TQString::tqfromLatin1("MainWindow"), /*saveWindowSize=*//*FIXME:false:Why was it false??*/true);
// m_actShowToolbar->setChecked( toolBar()->isShown() ); // m_actShowToolbar->setChecked( toolBar()->isShown() );
m_actShowStatusbar->setChecked( statusBar()->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() ?? createGUI("basketui.rc"); // TODO: Reconnect tags menu aboutToShow() ??
if (!Global::bnpView->isPart()) if (!Global::bnpView->isPart())
Global::bnpView->connectTagsMenu(); // The Tags menu was created again! Global::bnpView->connectTagsMenu(); // The Tags menu was created again!
plugActionList( TQString::fromLatin1("go_baskets_list"), actBasketsList); plugActionList( TQString::tqfromLatin1("go_baskets_list"), actBasketsList);
applyMainWindowSettings( KGlobal::config(), autoSaveGroup() ); applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
} }
@ -221,13 +221,13 @@ void MainWindow::polish()
bool shouldSave = false; bool shouldSave = false;
// If position and size has never been set, set nice ones: // If position and size has never been set, set nice ones:
// - Set size to sizeHint() // - Set size to tqsizeHint()
// - Keep the window manager placing the window where it want and save this // - Keep the window manager placing the window where it want and save this
if (Settings::mainWindowSize().isEmpty()) { if (Settings::mainWindowSize().isEmpty()) {
// std::cout << "Main Window Position: Initial Set in show()" << std::endl; // std::cout << "Main Window Position: Initial Set in show()" << std::endl;
int defaultWidth = kapp->desktop()->width() * 5 / 6; int defaultWidth = kapp->desktop()->width() * 5 / 6;
int defaultHeight = kapp->desktop()->height() * 5 / 6; int defaultHeight = kapp->desktop()->height() * 5 / 6;
resize(defaultWidth, defaultHeight); // sizeHint() is bad (too small) and we want the user to have a good default area size resize(defaultWidth, defaultHeight); // tqsizeHint() is bad (too small) and we want the user to have a good default area size
shouldSave = true; shouldSave = true;
} else { } else {
// std::cout << "Main Window Position: Recall in show(x=" // std::cout << "Main Window Position: Recall in show(x="
@ -307,7 +307,7 @@ bool MainWindow::queryClose()
bool MainWindow::askForQuit() bool MainWindow::askForQuit()
{ {
TQString message = i18n("<p>Do you really want to quit %1?</p>").arg(kapp->aboutData()->programName()); TQString message = i18n("<p>Do you really want to quit %1?</p>").tqarg(kapp->aboutData()->programName());
if (Settings::useSystray()) if (Settings::useSystray())
message += i18n("<p>Notice that you do not have to quit the application before ending your KDE session. " 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>"); "If you end your session while the application is still running, the application will be reloaded the next time you log in.</p>");

@ -28,7 +28,7 @@
#include <ksystemtray.h> #include <ksystemtray.h>
#include <tqptrlist.h> #include <tqptrlist.h>
#include <tqpoint.h> #include <tqpoint.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <kaction.h> #include <kaction.h>
#include <tqpixmap.h> #include <tqpixmap.h>
#include <tqdesktopwidget.h> #include <tqdesktopwidget.h>

@ -21,7 +21,7 @@
#include <kicondialog.h> #include <kicondialog.h>
#include <tqlineedit.h> #include <tqlineedit.h>
#include <kiconview.h> #include <kiconview.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <klocale.h> #include <klocale.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
@ -98,7 +98,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
m_icon->setIconType(KIcon::NoGroup, KIcon::Action); m_icon->setIconType(KIcon::NoGroup, KIcon::Action);
m_icon->setIconSize(16); m_icon->setIconSize(16);
m_icon->setIcon(m_defaultProperties.icon.isEmpty() ? "basket" : m_defaultProperties.icon); m_icon->setIcon(m_defaultProperties.icon.isEmpty() ? "basket" : m_defaultProperties.icon);
int size = TQMAX(m_icon->sizeHint().width(), m_icon->sizeHint().height()); int size = TQMAX(m_icon->tqsizeHint().width(), m_icon->tqsizeHint().height());
m_icon->setFixedSize(size, size); // Make it square! m_icon->setFixedSize(size, size); // Make it square!
TQToolTip::add(m_icon, i18n("Icon")); TQToolTip::add(m_icon, i18n("Icon"));
m_name = new TQLineEdit(/*i18n("Basket"), */page); m_name = new TQLineEdit(/*i18n("Basket"), */page);
@ -108,7 +108,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
TQToolTip::add(m_name, i18n("Name")); TQToolTip::add(m_name, i18n("Name"));
m_backgroundColor = new KColorCombo2(TQColor(), KGlobalSettings::baseColor(), page); m_backgroundColor = new KColorCombo2(TQColor(), KGlobalSettings::baseColor(), page);
m_backgroundColor->setColor(TQColor()); m_backgroundColor->setColor(TQColor());
m_backgroundColor->setFixedSize(m_backgroundColor->sizeHint()); m_backgroundColor->setFixedSize(m_backgroundColor->tqsizeHint());
m_backgroundColor->setColor(m_defaultProperties.backgroundColor); m_backgroundColor->setColor(m_defaultProperties.backgroundColor);
TQToolTip::add(m_backgroundColor, i18n("Background color")); TQToolTip::add(m_backgroundColor, i18n("Background color"));
nameLayout->addWidget(m_icon); nameLayout->addWidget(m_icon);
@ -116,7 +116,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
nameLayout->addWidget(m_backgroundColor); nameLayout->addWidget(m_backgroundColor);
topLayout->addLayout(nameLayout); topLayout->addLayout(nameLayout);
TQHBoxLayout *layout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint()); TQHBoxLayout *tqlayout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint());
KPushButton *button = new KPushButton( KGuiItem(i18n("&Manage Templates..."), "configure"), page ); KPushButton *button = new KPushButton( KGuiItem(i18n("&Manage Templates..."), "configure"), page );
connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(manageTemplates()) ); connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(manageTemplates()) );
button->hide(); button->hide();
@ -200,16 +200,16 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
painter.end(); painter.end();
lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Mind map"), icon);*/ lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Mind map"), icon);*/
m_templates->setMinimumHeight(topLayout->minimumSize().width() * 9 / 16); m_templates->setMinimumHeight(topLayout->tqminimumSize().width() * 9 / 16);
TQLabel *label = new TQLabel(m_templates, i18n("&Template:"), page); TQLabel *label = new TQLabel(m_templates, i18n("&Template:"), page);
layout->addWidget(label, /*stretch=*/0, TQt::AlignBottom); tqlayout->addWidget(label, /*stretch=*/0, TQt::AlignBottom);
layout->addStretch(); tqlayout->addStretch();
layout->addWidget(button, /*stretch=*/0, TQt::AlignBottom); tqlayout->addWidget(button, /*stretch=*/0, TQt::AlignBottom);
topLayout->addLayout(layout); topLayout->addLayout(tqlayout);
topLayout->addWidget(m_templates); topLayout->addWidget(m_templates);
layout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint()); tqlayout = new TQHBoxLayout(/*parent=*/0, /*margin=*/0, spacingHint());
m_createIn = new TQComboBox(page); m_createIn = new TQComboBox(page);
m_createIn->insertItem(i18n("(Baskets)")); m_createIn->insertItem(i18n("(Baskets)"));
label = new TQLabel(m_createIn, i18n("C&reate in:"), page); 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>Grouping baskets in folders for different projects;</li>"
"<li>Making sections with sub-baskets representing chapters or pages;</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); "<li>Making a group of baskets to export together (to eg. email them to people).</li></ul>"), page);
layout->addWidget(label); tqlayout->addWidget(label);
layout->addWidget(m_createIn); tqlayout->addWidget(m_createIn);
layout->addWidget(helpLabel); tqlayout->addWidget(helpLabel);
layout->addStretch(); tqlayout->addStretch();
topLayout->addLayout(layout); topLayout->addLayout(tqlayout);
m_basketsMap.clear(); m_basketsMap.clear();
m_basketsMap.insert(/*index=*/0, /*basket=*/0L); m_basketsMap.insert(/*index=*/0, /*basket=*/0L);

@ -73,7 +73,7 @@ Note::Note(Basket *parent)
m_x(0), m_y(-1), m_width(-1), m_height(-1), m_x(0), m_y(-1), m_width(-1), m_height(-1),
m_groupWidth(250), m_groupWidth(250),
m_isFolded(false), m_firstChild(0L), m_parentNote(0), m_isFolded(false), m_firstChild(0L), m_parentNote(0),
m_basket(parent), m_content(0), m_addedDate(TQDateTime::currentDateTime()), m_lastModificationDate(TQDateTime::currentDateTime()), m_basket(parent), m_content(0), m_addedDate(TQDateTime::tqcurrentDateTime()), m_lastModificationDate(TQDateTime::tqcurrentDateTime()),
m_computedAreas(false), m_onTop(false), m_computedAreas(false), m_onTop(false),
m_deltaX(0), m_deltaY(0), m_deltaHeight(0), m_collapseFinished(true), m_expandingFinished(true), 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), 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(); child->unsetWidth();
} }
void Note::requestRelayout() void Note::requestRetqlayout()
{ {
m_width = 0; m_width = 0;
unbufferize(); unbufferize();
basket()->relayoutNotes(true); // TODO: A signal that will relayout ONCE and DELAYED if called several times basket()->relayoutNotes(true); // TODO: A signal that will retqlayout ONCE and DELAYED if called several times
} }
void Note::setWidth(int width) // TODO: inline ? void Note::setWidth(int width) // TODO: inline ?
{ {
if (m_width != width) if (m_width != width)
setWidthForceRelayout(width); setWidthForceRetqlayout(width);
} }
void Note::setWidthForceRelayout(int width) void Note::setWidthForceRetqlayout(int width)
{ {
unbufferize(); unbufferize();
m_width = (width < minWidth() ? minWidth() : width); m_width = (width < minWidth() ? minWidth() : width);
@ -970,7 +970,7 @@ void Note::toggleFolded(bool animate)
if (animate) { if (animate) {
// We animate collapsing (so sub-notes fluidly go under the first note) // 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 relayout will animate the expanding) // We don't animate expanding: we place sub-notes directly under the first note (and the next retqlayout will animate the expanding)
// But if user quickly collapsed and then expand (while the collapsing animation isn't finished), we animate anyway // But if user quickly collapsed and then expand (while the collapsing animation isn't finished), we animate anyway
bool animateSetUnder = (m_isFolded || !m_collapseFinished); bool animateSetUnder = (m_isFolded || !m_collapseFinished);
// std::cout << "fold:" << m_isFolded << " collapseFinished:" << m_collapseFinished << " animateSetUnder:" << animateSetUnder << std::endl; // 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_computedAreas = false;
m_areas.clear(); m_areas.clear();
// Don't relayout free notes one under the other, because by definition they are freely positionned! // Don't retqlayout free notes one under the other, because by definition they are freely positionned!
if (isFree()) { if (isFree()) {
x = finalX(); x = finalX();
y = finalY(); y = finalY();
@ -1109,7 +1109,7 @@ void Note::relayoutAt(int x, int y, bool animate)
cancelAnimation(); cancelAnimation();
setX(x); setX(x);
setY(y); setY(y);
// But relayout others vertically if they are inside such primary groups or if it is a "normal" basket: // But retqlayout others vertically if they are inside such primary groups or if it is a "normal" basket:
} else { } else {
if (animate) if (animate)
setFinalPosition(x, y); setFinalPosition(x, y);
@ -1120,13 +1120,13 @@ void Note::relayoutAt(int x, int y, bool animate)
} }
} }
// Then, relayout sub-notes (only the first, if the group is folded) and so, assign an height to the group: // Then, retqlayout sub-notes (only the first, if the group is folded) and so, assign an height to the group:
if (isGroup()) { if (isGroup()) {
int h = 0; int h = 0;
Note *child = firstChild(); Note *child = firstChild();
bool first = true; bool first = true;
while (child) { while (child) {
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 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
child->relayoutAt(x + width(), y+h, animate); child->relayoutAt(x + width(), y+h, animate);
h += child->finalHeight(); h += child->finalHeight();
} else // In case the user collapse a group, then move it and then expand it: } 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 the current style is a KStyle, use it to draw the expander (plus or minus):
if (dynamic_cast<KStyle*>(&(kapp->tqstyle())) != NULL) { if (dynamic_cast<KStyle*>(&(kapp->tqstyle())) != NULL) {
// Set the 4 rounded corners background to background color: // Set the 4 rounded corners background to background color:
TQColorGroup cg(basket->colorGroup()); TQColorGroup cg(basket->tqcolorGroup());
cg.setColor(TQColorGroup::Base, background); cg.setColor(TQColorGroup::Base, background);
// Fill the inside of the expander in white, typically: // 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 { } else {
int width = EXPANDER_WIDTH; int width = EXPANDER_WIDTH;
int height = EXPANDER_HEIGHT; int height = EXPANDER_HEIGHT;
const TQColorGroup &cg = basket->colorGroup(); const TQColorGroup &cg = basket->tqcolorGroup();
// Fill white area: // Fill white area:
painter->fillRect(x + 1, y + 1, width - 2, height - 2, cg.base()); 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): // Determine the colors (for the richText drawing) and the text color (for the tags arrow too):
TQColorGroup cg(basket()->colorGroup()); TQColorGroup cg(basket()->tqcolorGroup());
cg.setColor(TQColorGroup::Text, (m_computedState.textColor().isValid() ? m_computedState.textColor() : basket()->textColor()) ); cg.setColor(TQColorGroup::Text, (m_computedState.textColor().isValid() ? m_computedState.textColor() : basket()->textColor()) );
cg.setColor(TQColorGroup::Background, bgColor); cg.setColor(TQColorGroup::Background, bgColor);
if (isSelected()) if (isSelected())
@ -1990,14 +1990,14 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect)
TQColor textColor = cg.color(TQColorGroup::Text); TQColor textColor = cg.color(TQColorGroup::Text);
TQColor light = Tools::mixColor(textColor, bgColor); TQColor light = Tools::mixColor(textColor, bgColor);
TQColor mid = Tools::mixColor(textColor, light); TQColor mid = Tools::mixColor(textColor, light);
painter2.setPen(light);//TQPen(basket()->colorGroup().dark().light(150))); painter2.setPen(light);//TQPen(basket()->tqcolorGroup().dark().light(150)));
painter2.drawLine(xIcon, yIcon + 6, xIcon + 4, yIcon + 6); painter2.drawLine(xIcon, yIcon + 6, xIcon + 4, yIcon + 6);
painter2.setPen(mid);//TQPen(basket()->colorGroup().dark())); painter2.setPen(mid);//TQPen(basket()->tqcolorGroup().dark()));
painter2.drawLine(xIcon + 1, yIcon + 7, xIcon + 3, yIcon + 7); painter2.drawLine(xIcon + 1, yIcon + 7, xIcon + 3, yIcon + 7);
painter2.setPen(textColor);//TQPen(basket()->colorGroup().foreground())); painter2.setPen(textColor);//TQPen(basket()->tqcolorGroup().foreground()));
painter2.drawPoint(xIcon + 2, yIcon + 8); painter2.drawPoint(xIcon + 2, yIcon + 8);
} else if (m_haveInvisibleTags) { } else if (m_haveInvisibleTags) {
painter2.setPen(cg.color(TQColorGroup::Text)/*TQPen(basket()->colorGroup().foreground())*/); painter2.setPen(cg.color(TQColorGroup::Text)/*TQPen(basket()->tqcolorGroup().foreground())*/);
painter2.drawPoint(xIcon, yIcon + 7); painter2.drawPoint(xIcon, yIcon + 7);
painter2.drawPoint(xIcon + 2, yIcon + 7); painter2.drawPoint(xIcon + 2, yIcon + 7);
painter2.drawPoint(xIcon + 4, yIcon + 7); painter2.drawPoint(xIcon + 4, yIcon + 7);
@ -2146,7 +2146,7 @@ void Note::recomputeStyle()
// unsetWidth(); // unsetWidth();
if (content()) if (content())
content()->fontChanged(); content()->fontChanged();
// requestRelayout(); // TODO! // requestRetqlayout(); // TODO!
} }
void Note::recomputeAllStyles() void Note::recomputeAllStyles()

@ -74,7 +74,7 @@ class Note
// int m_minContentWidth; // int m_minContentWidth;
public: public:
void setWidth(int width); void setWidth(int width);
void setWidthForceRelayout(int width); void setWidthForceRetqlayout(int width);
void setInitialHeight(int height) { m_height = height; } /// << Do NEVER use it unless you know what you do! void setInitialHeight(int height) { m_height = height; } /// << Do NEVER use it unless you know what you do!
void setX(int x); void setX(int x);
void setY(int y); void setY(int y);
@ -93,7 +93,7 @@ class Note
int minWidth(); int minWidth();
int minRight(); int minRight();
void unsetWidth(); void unsetWidth();
void requestRelayout(); void requestRetqlayout();
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! 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: /// FREE AND COLUMN LAYOUTS MANAGEMENT:

@ -22,7 +22,7 @@
#include <tqdir.h> #include <tqdir.h>
#include <tqdom.h> #include <tqdom.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <stylesheet.h> #include <tqstylesheet.h>
#include <tqfontmetrics.h> #include <tqfontmetrics.h>
#include <tqwidget.h> #include <tqwidget.h>
#include <tqcursor.h> #include <tqcursor.h>
@ -138,7 +138,7 @@ void NoteContent::contentChanged(int newMinWidth)
m_minWidth = newMinWidth; m_minWidth = newMinWidth;
if (note()) { if (note()) {
// note()->unbufferize(); // note()->unbufferize();
note()->requestRelayout(); // TODO: It should re-set the width! m_width = 0 ? contentChanged: setWidth, geteight, if size havent changed, only repaint and not relayout note()->requestRetqlayout(); // TODO: It should re-set the width! m_width = 0 ? contentChanged: setWidth, geteight, if size havent changed, only tqrepaint and not retqlayout
} }
} }
@ -152,7 +152,7 @@ Basket* NoteContent::basket()
void NoteContent::setEdited() void NoteContent::setEdited()
{ {
note()->setLastModificationDate(TQDateTime::currentDateTime()); note()->setLastModificationDate(TQDateTime::tqcurrentDateTime());
basket()->save(); basket()->save();
} }
@ -210,7 +210,7 @@ TQString LinkContent::toText(const TQString &/*cuttedFullPath*/)
else if (title().isEmpty()) else if (title().isEmpty())
return url().prettyURL(); return url().prettyURL();
else else
return TQString("%1 <%2>").arg(title(), url().prettyURL()); return TQString("%1 <%2>").tqarg(title(), url().prettyURL());
} }
TQString ColorContent::toText(const TQString &/*cuttedFullPath*/) { return color().name(); } TQString ColorContent::toText(const TQString &/*cuttedFullPath*/) { return color().name(); }
TQString UnknownContent::toText(const TQString &/*cuttedFullPath*/) { return ""; } TQString UnknownContent::toText(const TQString &/*cuttedFullPath*/) { return ""; }
@ -223,25 +223,25 @@ TQString HtmlContent::toHtml(const TQString &/*imageName*/, const TQString &/*cu
{ return Tools::htmlToParagraph(html()); } { return Tools::htmlToParagraph(html()); }
TQString ImageContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) TQString ImageContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
{ return TQString("<img src=\"%1\">").arg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); } { return TQString("<img src=\"%1\">").tqarg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); }
TQString AnimationContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) TQString AnimationContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
{ return TQString("<img src=\"%1\">").arg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); } { return TQString("<img src=\"%1\">").tqarg(cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath); }
TQString SoundContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) TQString SoundContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
{ return TQString("<a href=\"%1\">%2</a>").arg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon? { return TQString("<a href=\"%1\">%2</a>").tqarg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon?
TQString FileContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) TQString FileContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
{ return TQString("<a href=\"%1\">%2</a>").arg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon? { return TQString("<a href=\"%1\">%2</a>").tqarg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), fileName()); } // With the icon?
TQString LinkContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/) TQString LinkContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/)
{ return TQString("<a href=\"%1\">%2</a>").arg(url().prettyURL(), title()); } // With the icon? { return TQString("<a href=\"%1\">%2</a>").tqarg(url().prettyURL(), title()); } // With the icon?
TQString LauncherContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath) TQString LauncherContent::toHtml(const TQString &/*imageName*/, const TQString &cuttedFullPath)
{ return TQString("<a href=\"%1\">%2</a>").arg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), name()); } // With the icon? { return TQString("<a href=\"%1\">%2</a>").tqarg((cuttedFullPath.isEmpty() ? fullPath() : cuttedFullPath), name()); } // With the icon?
TQString ColorContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/) TQString ColorContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/)
{ return TQString("<span style=\"color: %1\">%2</span>").arg(color().name(), color().name()); } { return TQString("<span style=\"color: %1\">%2</span>").tqarg(color().name(), color().name()); }
TQString UnknownContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/) TQString UnknownContent::toHtml(const TQString &/*imageName*/, const TQString &/*cuttedFullPath*/)
{ return ""; } { return ""; }
@ -378,14 +378,14 @@ TQPixmap HtmlContent::feedbackPixmap(int width, int height)
{ {
TQSimpleRichText richText(html(), note()->font()); TQSimpleRichText richText(html(), note()->font());
richText.setWidth(width); richText.setWidth(width);
TQColorGroup colorGroup(basket()->colorGroup()); TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
colorGroup.setColor(TQColorGroup::Text, note()->textColor()); tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
TQPixmap pixmap( TQMIN(width, richText.widthUsed()), TQMIN(height, richText.height()) ); TQPixmap pixmap( TQMIN(width, richText.widthUsed()), TQMIN(height, richText.height()) );
pixmap.fill(note()->backgroundColor().dark(FEEDBACK_DARKING)); pixmap.fill(note()->backgroundColor().dark(FEEDBACK_DARKING));
TQPainter painter(&pixmap); TQPainter painter(&pixmap);
painter.setPen(note()->textColor()); painter.setPen(note()->textColor());
richText.draw(&painter, 0, 0, TQRect(0, 0, pixmap.width(), pixmap.height()), colorGroup); richText.draw(&painter, 0, 0, TQRect(0, 0, pixmap.width(), pixmap.height()), tqcolorGroup);
painter.end(); painter.end();
return pixmap; return pixmap;
} }
@ -433,10 +433,10 @@ TQPixmap AnimationContent::feedbackPixmap(int width, int height)
TQPixmap LinkContent::feedbackPixmap(int width, int height) TQPixmap LinkContent::feedbackPixmap(int width, int height)
{ {
TQColorGroup colorGroup(basket()->colorGroup()); TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
colorGroup.setColor(TQColorGroup::Text, note()->textColor()); tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
return m_linkDisplay.feedbackPixmap(width, height, colorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor()); return m_linkDisplay.feedbackPixmap(width, height, tqcolorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor());
} }
TQPixmap ColorContent::feedbackPixmap(int width, int height) 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 rectHeight = (textRect.height() + 2)*3/2;
int rectWidth = rectHeight * 14 / 10; // 1.4 times the height, like A4 papers. int rectWidth = rectHeight * 14 / 10; // 1.4 times the height, like A4 papers.
TQColorGroup colorGroup(basket()->colorGroup()); TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
colorGroup.setColor(TQColorGroup::Text, note()->textColor()); tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
TQPixmap pixmap( TQMIN(width, rectWidth + RECT_MARGIN + textRect.width() + RECT_MARGIN), TQMIN(height, rectHeight) ); TQPixmap pixmap( TQMIN(width, rectWidth + RECT_MARGIN + textRect.width() + RECT_MARGIN), TQMIN(height, rectHeight) );
pixmap.fill(note()->backgroundColor().dark(FEEDBACK_DARKING)); pixmap.fill(note()->backgroundColor().dark(FEEDBACK_DARKING));
TQPainter painter(&pixmap); TQPainter painter(&pixmap);
paint(&painter, pixmap.width(), pixmap.height(), colorGroup, false, false, false); // We don't care of the three last boolean parameters. paint(&painter, pixmap.width(), pixmap.height(), tqcolorGroup, false, false, false); // We don't care of the three last boolean parameters.
painter.end(); painter.end();
return pixmap; return pixmap;
} }
TQPixmap FileContent::feedbackPixmap(int width, int height) TQPixmap FileContent::feedbackPixmap(int width, int height)
{ {
TQColorGroup colorGroup(basket()->colorGroup()); TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
colorGroup.setColor(TQColorGroup::Text, note()->textColor()); tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
return m_linkDisplay.feedbackPixmap(width, height, colorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor()); return m_linkDisplay.feedbackPixmap(width, height, tqcolorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor());
} }
TQPixmap LauncherContent::feedbackPixmap(int width, int height) TQPixmap LauncherContent::feedbackPixmap(int width, int height)
{ {
TQColorGroup colorGroup(basket()->colorGroup()); TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
colorGroup.setColor(TQColorGroup::Text, note()->textColor()); tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); tqcolorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING));
return m_linkDisplay.feedbackPixmap(width, height, colorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor()); return m_linkDisplay.feedbackPixmap(width, height, tqcolorGroup, /*isDefaultColor=*/note()->textColor() == basket()->textColor());
} }
TQPixmap UnknownContent::feedbackPixmap(int width, int height) 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); TQRect textRect = TQFontMetrics(note()->font()).boundingRect(0, 0, /*width=*/1, 500000, TQt::AlignAuto | TQt::AlignTop | TQt::WordBreak, m_mimeTypes);
TQColorGroup colorGroup(basket()->colorGroup()); TQColorGroup tqcolorGroup(basket()->tqcolorGroup());
colorGroup.setColor(TQColorGroup::Text, note()->textColor()); tqcolorGroup.setColor(TQColorGroup::Text, note()->textColor());
colorGroup.setColor(TQColorGroup::Background, note()->backgroundColor().dark(FEEDBACK_DARKING)); tqcolorGroup.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) ); TQPixmap pixmap( TQMIN(width, DECORATION_MARGIN + textRect.width() + DECORATION_MARGIN), TQMIN(height, DECORATION_MARGIN + textRect.height() + DECORATION_MARGIN) );
TQPainter painter(&pixmap); TQPainter painter(&pixmap);
paint(&painter, pixmap.width() + 1, pixmap.height(), colorGroup, false, false, false); // We don't care of the three last boolean parameters. paint(&painter, pixmap.width() + 1, pixmap.height(), tqcolorGroup, false, false, false); // We don't care of the three last boolean parameters.
painter.setPen(note()->backgroundColor().dark(FEEDBACK_DARKING)); painter.setPen(note()->backgroundColor().dark(FEEDBACK_DARKING));
painter.drawPoint(0, 0); painter.drawPoint(0, 0);
painter.drawPoint(pixmap.width() - 1, 0); painter.drawPoint(pixmap.width() - 1, 0);
@ -520,11 +520,11 @@ int TextContent::setWidthAndGetHeight(int width)
return 10; // Lazy loaded return 10; // Lazy loaded
} }
void TextContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) void TextContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{ {
if (m_simpleRichText) { if (m_simpleRichText) {
width -= 1; width -= 1;
m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), colorGroup); m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), tqcolorGroup);
} }
} }
@ -629,11 +629,11 @@ int HtmlContent::setWidthAndGetHeight(int width)
return 10; // Lazy loaded return 10; // Lazy loaded
} }
void HtmlContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) void HtmlContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{ {
if (m_simpleRichText) { if (m_simpleRichText) {
width -= 1; width -= 1;
m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), colorGroup); m_simpleRichText->draw(painter, 0, 0, TQRect(0, 0, width, height), tqcolorGroup);
} }
} }
@ -735,7 +735,7 @@ int ImageContent::setWidthAndGetHeight(int width)
} }
} }
void ImageContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*colorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) void ImageContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*tqcolorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{ {
width -= 1; width -= 1;
// KPixmap pixmap = m_pixmap; // KPixmap pixmap = m_pixmap;
@ -804,7 +804,7 @@ bool ImageContent::saveToFile()
void ImageContent::toolTipInfos(TQStringList *keys, TQStringList *values) void ImageContent::toolTipInfos(TQStringList *keys, TQStringList *values)
{ {
keys->append(i18n("Size")); keys->append(i18n("Size"));
values->append(i18n("%1 by %2 pixels").arg(TQString::number(m_pixmap.width()), TQString::number(m_pixmap.height()))); values->append(i18n("%1 by %2 pixels").tqarg(TQString::number(m_pixmap.width()), TQString::number(m_pixmap.height())));
} }
TQString ImageContent::messageWhenOpenning(OpenMessage where) TQString ImageContent::messageWhenOpenning(OpenMessage where)
@ -855,7 +855,7 @@ void ImageContent::exportToHTML(HTMLExporter *exporter, int /*indent*/)
int AnimationContent::INVALID_STATUS = -100; int AnimationContent::INVALID_STATUS = -100;
AnimationContent::AnimationContent(Note *parent, const TQString &fileName, bool lazyLoad) AnimationContent::AnimationContent(Note *parent, const TQString &fileName, bool lazyLoad)
: NoteContent(parent, fileName), m_oldStatus(INVALID_STATUS) : NoteContent(parent, fileName), m_oldtqStatus(INVALID_STATUS)
{ {
basket()->addWatchedFile(fullPath()); basket()->addWatchedFile(fullPath());
loadFromFile(lazyLoad); loadFromFile(lazyLoad);
@ -867,7 +867,7 @@ int AnimationContent::setWidthAndGetHeight(int /*width*/)
return m_movie.framePixmap().height() ; // TODO!!! return m_movie.framePixmap().height() ; // TODO!!!
} }
void AnimationContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*colorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) void AnimationContent::paint(TQPainter *painter, int width, int /*height*/, const TQColorGroup &/*tqcolorGroup*/, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{ {
/*width -= 1*/; /*width -= 1*/;
// DEBUG_WIN << "AnimationContent::paint()"; // DEBUG_WIN << "AnimationContent::paint()";
@ -929,7 +929,7 @@ bool AnimationContent::setMovie(const TQMovie &movie)
m_movie = movie; m_movie = movie;
m_movie.connectUpdate( this, TQT_SLOT(movieUpdated(const TQRect&)) ); m_movie.connectUpdate( this, TQT_SLOT(movieUpdated(const TQRect&)) );
m_movie.connectResize( this, TQT_SLOT(movieResized(const TQSize&)) ); m_movie.connectResize( this, TQT_SLOT(movieResized(const TQSize&)) );
m_movie.connectStatus( this, TQT_SLOT(movieStatus(int)) ); m_movie.connectStatus( this, TQT_SLOT(movietqStatus(int)) );
contentChanged( m_movie.framePixmap().width() + 1 ); // TODO contentChanged( m_movie.framePixmap().width() + 1 ); // TODO
return true; return true;
} }
@ -942,7 +942,7 @@ void AnimationContent::movieUpdated(const TQRect&)
void AnimationContent::movieResized(const TQSize&) void AnimationContent::movieResized(const TQSize&)
{ {
note()->requestRelayout(); // ? note()->requestRetqlayout(); // ?
} }
/** When a user drop a .gif file, for instance, we don't know if it is an image /** 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, * - For animation: TQMovie::EndOfFrame... (for each image), TQMovie::EndOfLoop,
* and it then restart that for each loop. * and it then restart that for each loop.
*/ */
void AnimationContent::movieStatus(int status) void AnimationContent::movietqStatus(int status)
{ {
DEBUG_WIN << "movieStatus()"; DEBUG_WIN << "movieStatus()";
// At least two frames: it's an animation, everything is OK // At least two frames: it's an animation, everything is OK
if (m_oldStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfFrame) { if (m_oldtqStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfFrame) {
movie().disconnectStatus(this); movie().disconnectStatus(this);
m_oldStatus = INVALID_STATUS; m_oldtqStatus = INVALID_STATUS;
// if (note()->isFocused()) // When inserting a new note we ensure it visble // 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 // 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 // Only one image: it's an image, change note's type
else if (m_oldStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfLoop) { else if (m_oldtqStatus == TQMovie::EndOfFrame && status == TQMovie::EndOfLoop) {
movie().disconnectStatus(this); movie().disconnectStatus(this);
m_oldStatus = INVALID_STATUS; m_oldtqStatus = INVALID_STATUS;
note()->setContent(new ImageContent(note(), fileName())); note()->setContent(new ImageContent(note(), fileName()));
basket()->save(); basket()->save();
//delete this; // CRASH, as always !!!!!!!!! //delete this; // CRASH, as always !!!!!!!!!
@ -977,13 +977,13 @@ void AnimationContent::movieStatus(int status)
// TQTimer::singleShot(25, note(), TQT_SLOT(delayedEnsureVisible())); // TQTimer::singleShot(25, note(), TQT_SLOT(delayedEnsureVisible()));
} }
else else
m_oldStatus = status; m_oldtqStatus = status;
} }
void AnimationContent::exportToHTML(HTMLExporter *exporter, int /*indent*/) void AnimationContent::exportToHTML(HTMLExporter *exporter, int /*indent*/)
{ {
exporter->stream << TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">") exporter->stream << TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">")
.arg( exporter->dataFolderName + exporter->copyFile(fullPath(), /*createIt=*/true), .tqarg( exporter->dataFolderName + exporter->copyFile(fullPath(), /*createIt=*/true),
TQString::number(movie().framePixmap().size().width()), TQString::number(movie().framePixmap().size().width()),
TQString::number(movie().framePixmap().size().height()) ); TQString::number(movie().framePixmap().size().height()) );
} }
@ -1004,9 +1004,9 @@ int FileContent::setWidthAndGetHeight(int width)
return m_linkDisplay.height(); return m_linkDisplay.height();
} }
void FileContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered) void FileContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered)
{ {
m_linkDisplay.paint(painter, 0, 0, width, height, colorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0); m_linkDisplay.paint(painter, 0, 0, width, height, tqcolorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0);
} }
bool FileContent::loadFromFile(bool /*lazyLoad*/) bool FileContent::loadFromFile(bool /*lazyLoad*/)
@ -1221,9 +1221,9 @@ int LinkContent::setWidthAndGetHeight(int width)
return m_linkDisplay.height(); return m_linkDisplay.height();
} }
void LinkContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered) void LinkContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered)
{ {
m_linkDisplay.paint(painter, 0, 0, width, height, colorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0); m_linkDisplay.paint(painter, 0, 0, width, height, tqcolorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0);
} }
void LinkContent::saveToNode(TQDomDocument &doc, TQDomElement &content) void LinkContent::saveToNode(TQDomDocument &doc, TQDomElement &content)
@ -1407,9 +1407,9 @@ int LauncherContent::setWidthAndGetHeight(int width)
return m_linkDisplay.height(); return m_linkDisplay.height();
} }
void LauncherContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered) void LauncherContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered)
{ {
m_linkDisplay.paint(painter, 0, 0, width, height, colorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0); m_linkDisplay.paint(painter, 0, 0, width, height, tqcolorGroup, isDefaultColor, isSelected, isHovered, isHovered && note()->hoveredZone() == Note::Custom0);
} }
bool LauncherContent::loadFromFile(bool /*lazyLoad*/) // TODO: saveToFile() ?? Is it possible? 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(); TQString exec = service.exec();
if (service.terminal()) if (service.terminal())
exec = i18n("%1 <i>(run in terminal)</i>").arg(exec); exec = i18n("%1 <i>(run in terminal)</i>").tqarg(exec);
if (!service.comment().isEmpty() && service.comment() != service.name()) { if (!service.comment().isEmpty() && service.comment() != service.name()) {
keys->append(i18n("Comment")); keys->append(i18n("Comment"));
@ -1527,7 +1527,7 @@ int ColorContent::setWidthAndGetHeight(int /*width*/) // We do not need width be
return rectHeight; return rectHeight;
} }
void ColorContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) void ColorContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{ {
// FIXME: Duplicate from setColor(): // FIXME: Duplicate from setColor():
TQRect textRect = TQFontMetrics(note()->font()).boundingRect(color().name()); 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: // Draw the text:
painter->setFont(note()->font()); painter->setFont(note()->font());
painter->setPen(colorGroup.text()); painter->setPen(tqcolorGroup.text());
painter->drawText(rectWidth + RECT_MARGIN, 0, width - rectWidth - RECT_MARGIN, height, TQt::AlignAuto | TQt::AlignVCenter, color().name()); 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); m_color.getHsv(&hue, &saturation, &value);
keys->append(i18n("RGB Colorspace: Red/Green/Blue", "RGB")); keys->append(i18n("RGB Colorspace: Red/Green/Blue", "RGB"));
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()))); 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())));
keys->append(i18n("HSV Colorspace: Hue/Saturation/Value", "HSV")); keys->append(i18n("HSV Colorspace: Hue/Saturation/Value", "HSV"));
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))); 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)));
static TQString cssColors[] = { static TQString cssColors[] = {
"aqua", "00ffff", "aqua", "00ffff",
@ -1778,12 +1778,12 @@ void ColorContent::exportToHTML(HTMLExporter *exporter, int /*indent*/)
int rectHeight = (textRect.height() + 2)*3/2; int rectHeight = (textRect.height() + 2)*3/2;
int rectWidth = rectHeight * 14 / 10; // 1.4 times the height, like A4 papers. int rectWidth = rectHeight * 14 / 10; // 1.4 times the height, like A4 papers.
TQString fileName = /*Tools::fileNameForNewFile(*/TQString(TQString("color_%1.png").arg(color().name()).lower().mid(1))/*, exportData.iconsFolderPath)*/; TQString fileName = /*Tools::fileNameForNewFile(*/TQString(TQString("color_%1.png").tqarg(color().name()).lower().mid(1))/*, exportData.iconsFolderPath)*/;
TQString fullPath = exporter->iconsFolderPath + fileName; TQString fullPath = exporter->iconsFolderPath + fileName;
TQPixmap colorIcon = KColorCombo2::colorRectPixmap(color(), /*isDefault=*/false, rectWidth, rectHeight); TQPixmap colorIcon = KColorCombo2::colorRectPixmap(color(), /*isDefault=*/false, rectWidth, rectHeight);
colorIcon.save(fullPath, "PNG"); colorIcon.save(fullPath, "PNG");
TQString iconHtml = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">") TQString iconHtml = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"\">")
.arg(exporter->iconsFolderName + fileName, TQString::number(colorIcon.width()), TQString::number(colorIcon.height())); .tqarg(exporter->iconsFolderName + fileName, TQString::number(colorIcon.width()), TQString::number(colorIcon.height()));
exporter->stream << iconHtml + " " + color().name(); 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, int x, int y, int w, int h,
bool sunken, bool horz, bool flat ); /*const*/ bool sunken, bool horz, bool flat ); /*const*/
void UnknownContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/) void UnknownContent::paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool /*isDefaultColor*/, bool /*isSelected*/, bool /*isHovered*/)
{ {
width -= 1; width -= 1;
painter->setPen(colorGroup.text()); painter->setPen(tqcolorGroup.text());
// FIXME: Duplicate from ColorContent::paint() and CommonColorSelector::drawColorRect: // FIXME: Duplicate from ColorContent::paint() and CommonColorSelector::drawColorRect:
// Fill with gradient: // Fill with gradient:
drawGradient(painter, colorGroup.background(), colorGroup.background().dark(110), 1, 1, width - 2, height - 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false); drawGradient(painter, tqcolorGroup.background(), tqcolorGroup.background().dark(110), 1, 1, width - 2, height - 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false);
// Stroke: // Stroke:
TQColor stroke = Tools::mixColor(colorGroup.background(), colorGroup.text()); TQColor stroke = Tools::mixColor(tqcolorGroup.background(), tqcolorGroup.text());
painter->setPen(stroke); painter->setPen(stroke);
painter->drawLine(1, 0, width - 2, 0); painter->drawLine(1, 0, width - 2, 0);
painter->drawLine(0, 1, 0, height - 2); painter->drawLine(0, 1, 0, height - 2);
painter->drawLine(1, height - 1, width - 2, height - 1); painter->drawLine(1, height - 1, width - 2, height - 1);
painter->drawLine(width - 1, 1, width - 1, height - 2); painter->drawLine(width - 1, 1, width - 1, height - 2);
// Round corners: // Round corners:
painter->setPen(Tools::mixColor(colorGroup.background(), stroke)); painter->setPen(Tools::mixColor(tqcolorGroup.background(), stroke));
painter->drawPoint(1, 1); painter->drawPoint(1, 1);
painter->drawPoint(1, height - 2); painter->drawPoint(1, height - 2);
painter->drawPoint(width - 2, height - 2); painter->drawPoint(width - 2, height - 2);
painter->drawPoint(width - 2, 1); painter->drawPoint(width - 2, 1);
painter->setPen(colorGroup.text()); painter->setPen(tqcolorGroup.text());
painter->drawText(DECORATION_MARGIN, DECORATION_MARGIN, width - 2*DECORATION_MARGIN, height - 2*DECORATION_MARGIN, painter->drawText(DECORATION_MARGIN, DECORATION_MARGIN, width - 2*DECORATION_MARGIN, height - 2*DECORATION_MARGIN,
TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak, m_mimeTypes); TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak, m_mimeTypes);
} }

@ -82,8 +82,8 @@ class NoteContent // TODO: Mark some methods as const! and some (lik
// Complexe Abstract Generic Methods: // Complexe Abstract Generic Methods:
virtual void exportToHTML(HTMLExporter *exporter, int indent) = 0; /// << Export the note in an HTML file. 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 TQString cssClass() = 0; /// << @return the CSS class of the note when exported to HTML
virtual int setWidthAndGetHeight(int width) = 0; /// << Relayout content with @p width (never less than minWidth()). @return its new height. 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 &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 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 bool loadFromFile(bool /*lazyLoad*/) { return false; } /// << Load the content from the file. The default implementation does nothing. @see fileName(). 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 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(). 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: public:
void setEdited(); /// << Mark the note as edited NOW: change the "last modification time and time" AND save the basket to XML file. void setEdited(); /// << Mark the note as edited NOW: change the "last modification time and time" AND save the basket to XML file.
protected: 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 relayout. 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.
private: private:
Note *m_note; Note *m_note;
TQString m_fileName; TQString m_fileName;
@ -163,7 +163,7 @@ class TextContent : public NoteContent
void exportToHTML(HTMLExporter *exporter, int indent); void exportToHTML(HTMLExporter *exporter, int indent);
TQString cssClass(); TQString cssClass();
int setWidthAndGetHeight(int width); int setWidthAndGetHeight(int width);
void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered);
bool loadFromFile(bool lazyLoad); bool loadFromFile(bool lazyLoad);
bool finishLazyLoad(); bool finishLazyLoad();
bool saveToFile(); bool saveToFile();
@ -176,7 +176,7 @@ class TextContent : public NoteContent
TQString messageWhenOpenning(OpenMessage where); TQString messageWhenOpenning(OpenMessage where);
// TQString customOpenCommand(); // TQString customOpenCommand();
// Content-Specific Methods: // Content-Specific Methods:
void setText(const TQString &text, bool lazyLoad = false); /// << Change the text note-content and relayout the note. void setText(const TQString &text, bool lazyLoad = false); /// << Change the text note-content and retqlayout the note.
TQString text() { return m_text; } /// << @return the text note-content. TQString text() { return m_text; } /// << @return the text note-content.
protected: protected:
TQString m_text; TQString m_text;
@ -206,7 +206,7 @@ class HtmlContent : public NoteContent
void exportToHTML(HTMLExporter *exporter, int indent); void exportToHTML(HTMLExporter *exporter, int indent);
TQString cssClass(); TQString cssClass();
int setWidthAndGetHeight(int width); int setWidthAndGetHeight(int width);
void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered);
bool loadFromFile(bool lazyLoad); bool loadFromFile(bool lazyLoad);
bool finishLazyLoad(); bool finishLazyLoad();
bool saveToFile(); bool saveToFile();
@ -219,7 +219,7 @@ class HtmlContent : public NoteContent
TQString messageWhenOpenning(OpenMessage where); TQString messageWhenOpenning(OpenMessage where);
TQString customOpenCommand(); TQString customOpenCommand();
// Content-Specific Methods: // Content-Specific Methods:
void setHtml(const TQString &html, bool lazyLoad = false); /// << Change the HTML note-content and relayout the note. void setHtml(const TQString &html, bool lazyLoad = false); /// << Change the HTML note-content and retqlayout the note.
TQString html() { return m_html; } /// << @return the HTML note-content. TQString html() { return m_html; } /// << @return the HTML note-content.
protected: protected:
TQString m_html; TQString m_html;
@ -249,7 +249,7 @@ class ImageContent : public NoteContent
void exportToHTML(HTMLExporter *exporter, int indent); void exportToHTML(HTMLExporter *exporter, int indent);
TQString cssClass(); TQString cssClass();
int setWidthAndGetHeight(int width); int setWidthAndGetHeight(int width);
void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered);
bool loadFromFile(bool lazyLoad); bool loadFromFile(bool lazyLoad);
bool finishLazyLoad(); bool finishLazyLoad();
bool saveToFile(); bool saveToFile();
@ -263,7 +263,7 @@ class ImageContent : public NoteContent
TQString messageWhenOpenning(OpenMessage where); TQString messageWhenOpenning(OpenMessage where);
TQString customOpenCommand(); TQString customOpenCommand();
// Content-Specific Methods: // Content-Specific Methods:
void setPixmap(const TQPixmap &pixmap); /// << Change the pixmap note-content and relayout the note. void setPixmap(const TQPixmap &pixmap); /// << Change the pixmap note-content and retqlayout the note.
TQPixmap pixmap() { return m_pixmap; } /// << @return the pixmap note-content. TQPixmap pixmap() { return m_pixmap; } /// << @return the pixmap note-content.
protected: protected:
TQPixmap m_pixmap; TQPixmap m_pixmap;
@ -299,7 +299,7 @@ class AnimationContent : public TQObject, public NoteContent // TQObject to be a
void exportToHTML(HTMLExporter *exporter, int indent); void exportToHTML(HTMLExporter *exporter, int indent);
TQString cssClass(); TQString cssClass();
int setWidthAndGetHeight(int width); int setWidthAndGetHeight(int width);
void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered);
bool loadFromFile(bool lazyLoad); bool loadFromFile(bool lazyLoad);
bool finishLazyLoad(); bool finishLazyLoad();
bool saveToFile(); bool saveToFile();
@ -307,15 +307,15 @@ class AnimationContent : public TQObject, public NoteContent // TQObject to be a
TQString messageWhenOpenning(OpenMessage where); TQString messageWhenOpenning(OpenMessage where);
TQString customOpenCommand(); TQString customOpenCommand();
// Content-Specific Methods: // Content-Specific Methods:
bool setMovie(const TQMovie &movie); /// << Change the movie note-content and relayout the note. bool setMovie(const TQMovie &movie); /// << Change the movie note-content and retqlayout the note.
TQMovie movie() { return m_movie; } /// << @return the movie note-content. TQMovie movie() { return m_movie; } /// << @return the movie note-content.
protected slots: protected slots:
void movieUpdated(const TQRect&); void movieUpdated(const TQRect&);
void movieResized(const TQSize&); void movieResized(const TQSize&);
void movieStatus(int status); void movietqStatus(int status);
protected: protected:
TQMovie m_movie; TQMovie m_movie;
int m_oldStatus; int m_oldtqStatus;
static int INVALID_STATUS; static int INVALID_STATUS;
}; };
@ -342,7 +342,7 @@ class FileContent : public TQObject, public NoteContent
void exportToHTML(HTMLExporter *exporter, int indent); void exportToHTML(HTMLExporter *exporter, int indent);
TQString cssClass(); TQString cssClass();
int setWidthAndGetHeight(int width); int setWidthAndGetHeight(int width);
void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered);
bool loadFromFile(bool /*lazyLoad*/); bool loadFromFile(bool /*lazyLoad*/);
void fontChanged(); void fontChanged();
void linkLookChanged(); void linkLookChanged();
@ -360,7 +360,7 @@ class FileContent : public TQObject, public NoteContent
// Open Content or File: // Open Content or File:
TQString messageWhenOpenning(OpenMessage where); TQString messageWhenOpenning(OpenMessage where);
// Content-Specific Methods: // Content-Specific Methods:
void setFileName(const TQString &fileName); /// << Reimplemented to be able to relayout the note. void setFileName(const TQString &fileName); /// << Reimplemented to be able to retqlayout the note.
virtual LinkLook* linkLook() { return LinkLook::fileLook; } virtual LinkLook* linkLook() { return LinkLook::fileLook; }
protected: protected:
LinkDisplay m_linkDisplay; LinkDisplay m_linkDisplay;
@ -430,7 +430,7 @@ class LinkContent : public TQObject, public NoteContent
void exportToHTML(HTMLExporter *exporter, int indent); void exportToHTML(HTMLExporter *exporter, int indent);
TQString cssClass(); TQString cssClass();
int setWidthAndGetHeight(int width); int setWidthAndGetHeight(int width);
void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered);
void saveToNode(TQDomDocument &doc, TQDomElement &content); void saveToNode(TQDomDocument &doc, TQDomElement &content);
void fontChanged(); void fontChanged();
void linkLookChanged(); void linkLookChanged();
@ -449,7 +449,7 @@ class LinkContent : public TQObject, public NoteContent
KURL urlToOpen(bool /*with*/); KURL urlToOpen(bool /*with*/);
TQString messageWhenOpenning(OpenMessage where); TQString messageWhenOpenning(OpenMessage where);
// Content-Specific Methods: // Content-Specific Methods:
void setLink(const KURL &url, const TQString &title, const TQString &icon, bool autoTitle, bool autoIcon); /// << Change the link and relayout the note. void setLink(const KURL &url, const TQString &title, const TQString &icon, bool autoTitle, bool autoIcon); /// << Change the link and retqlayout the note.
KURL url() { return m_url; } /// << @return the URL of the link note-content. 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 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. 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); void exportToHTML(HTMLExporter *exporter, int indent);
TQString cssClass(); TQString cssClass();
int setWidthAndGetHeight(int width); int setWidthAndGetHeight(int width);
void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered);
bool loadFromFile(bool /*lazyLoad*/); bool loadFromFile(bool /*lazyLoad*/);
void fontChanged(); void fontChanged();
TQString editToolTipText(); TQString editToolTipText();
@ -509,7 +509,7 @@ class LauncherContent : public NoteContent
KURL urlToOpen(bool with); KURL urlToOpen(bool with);
TQString messageWhenOpenning(OpenMessage where); TQString messageWhenOpenning(OpenMessage where);
// Content-Specific Methods: // Content-Specific Methods:
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). 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).
TQString name() { return m_name; } /// << @return the URL of the launcher note-content. 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 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. 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); void exportToHTML(HTMLExporter *exporter, int indent);
TQString cssClass(); TQString cssClass();
int setWidthAndGetHeight(int width); int setWidthAndGetHeight(int width);
void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered);
void saveToNode(TQDomDocument &doc, TQDomElement &content); void saveToNode(TQDomDocument &doc, TQDomElement &content);
void fontChanged(); void fontChanged();
TQString editToolTipText(); TQString editToolTipText();
@ -554,7 +554,7 @@ class ColorContent : public NoteContent
bool needSpaceForFeedbackPixmap() { return true; } bool needSpaceForFeedbackPixmap() { return true; }
void addAlternateDragObjects(KMultipleDrag *dragObject); void addAlternateDragObjects(KMultipleDrag *dragObject);
// Content-Specific Methods: // Content-Specific Methods:
void setColor(const TQColor &color); /// << Change the color note-content and relayout the note. void setColor(const TQColor &color); /// << Change the color note-content and retqlayout the note.
TQColor color() { return m_color; } /// << @return the color note-content. TQColor color() { return m_color; } /// << @return the color note-content.
protected: protected:
TQColor m_color; TQColor m_color;
@ -584,7 +584,7 @@ class UnknownContent : public NoteContent
void exportToHTML(HTMLExporter *exporter, int indent); void exportToHTML(HTMLExporter *exporter, int indent);
TQString cssClass(); TQString cssClass();
int setWidthAndGetHeight(int width); int setWidthAndGetHeight(int width);
void paint(TQPainter *painter, int width, int height, const TQColorGroup &colorGroup, bool isDefaultColor, bool isSelected, bool isHovered); void paint(TQPainter *painter, int width, int height, const TQColorGroup &tqcolorGroup, bool isDefaultColor, bool isSelected, bool isHovered);
bool loadFromFile(bool /*lazyLoad*/); bool loadFromFile(bool /*lazyLoad*/);
void fontChanged(); void fontChanged();
TQString editToolTipText(); TQString editToolTipText();

@ -21,7 +21,7 @@
#include <tqdragobject.h> #include <tqdragobject.h>
#include <tqdir.h> #include <tqdir.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include <tqbuffer.h> #include <tqbuffer.h>
#include <kurldrag.h> #include <kurldrag.h>
#include <tdeversion.h> #include <tdeversion.h>
@ -227,7 +227,7 @@ void NoteDrag::serializeLinks(NoteSelection *noteList, KMultipleDrag *multipleDr
multipleDrag->addDragObject(urlsDrag); multipleDrag->addDragObject(urlsDrag);
#else #else
KURLDrag2 *urlsDrag = new KURLDrag2(urls); KURLDrag2 *urlsDrag = new KURLDrag2(urls);
TQByteArray byteArray = urlsDrag->encodedData2("text/uri-list"); TQByteArray byteArray = urlsDrag->tqencodedData2("text/uri-list");
TQStoredDrag *uriListDrag = new TQStoredDrag("text/uri-list"); TQStoredDrag *uriListDrag = new TQStoredDrag("text/uri-list");
uriListDrag->setEncodedData(byteArray); uriListDrag->setEncodedData(byteArray);
multipleDrag->addDragObject(uriListDrag); multipleDrag->addDragObject(uriListDrag);
@ -375,7 +375,7 @@ bool NoteDrag::canDecode(TQMimeSource *source)
Basket* NoteDrag::basketOf(TQMimeSource *source) Basket* NoteDrag::basketOf(TQMimeSource *source)
{ {
TQBuffer buffer(source->encodedData(NOTE_MIME_STRING)); TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING));
if (buffer.open(IO_ReadOnly)) { if (buffer.open(IO_ReadOnly)) {
TQDataStream stream(&buffer); TQDataStream stream(&buffer);
// Get the parent basket: // Get the parent basket:
@ -388,7 +388,7 @@ Basket* NoteDrag::basketOf(TQMimeSource *source)
TQValueList<Note*> NoteDrag::notesOf(TQMimeSource *source) TQValueList<Note*> NoteDrag::notesOf(TQMimeSource *source)
{ {
TQBuffer buffer(source->encodedData(NOTE_MIME_STRING)); TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING));
if (buffer.open(IO_ReadOnly)) { if (buffer.open(IO_ReadOnly)) {
TQDataStream stream(&buffer); TQDataStream stream(&buffer);
// Get the parent basket: // 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) Note* NoteDrag::decode(TQMimeSource *source, Basket *parent, bool moveFiles, bool moveNotes)
{ {
TQBuffer buffer(source->encodedData(NOTE_MIME_STRING)); TQBuffer buffer(source->tqencodedData(NOTE_MIME_STRING));
if (buffer.open(IO_ReadOnly)) { if (buffer.open(IO_ReadOnly)) {
TQDataStream stream(&buffer); TQDataStream stream(&buffer);
// Get the parent basket: // 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): // Test if it was a UTF-16 string (from eg. Mozilla):
if (str.length() >= 2) { if (str.length() >= 2) {
if ((str[0] == 0xFF && str[1] == 0xFE) || (str[0] == 0xFE && str[1] == 0xFF)) { if ((str[0] == 0xFF && str[1] == 0xFE) || (str[0] == 0xFE && str[1] == 0xFF)) {
TQByteArray utf16 = e->encodedData(TQString("text/" + subtype).local8Bit()); TQByteArray utf16 = e->tqencodedData(TQString("text/" + subtype).local8Bit());
str = TQTextCodec::codecForName("utf16")->toUnicode(utf16); str = TQTextCodec::codecForName("utf16")->toUnicode(utf16);
return true; 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) // Test if it was empty (sometimes, from GNOME or Mozilla)
if (str.length() == 0 && subtype == "plain") { if (str.length() == 0 && subtype == "plain") {
if (e->provides("UTF8_STRING")) { if (e->provides("UTF8_STRING")) {
TQByteArray utf8 = e->encodedData("UTF8_STRING"); TQByteArray utf8 = e->tqencodedData("UTF8_STRING");
str = TQTextCodec::codecForName("utf8")->toUnicode(utf8); str = TQTextCodec::codecForName("utf8")->toUnicode(utf8);
return true; return true;
} }
if (e->provides("text/unicode")) { // FIXME: It's UTF-16 without order bytes!!! if (e->provides("text/tqunicode")) { // FIXME: It's UTF-16 without order bytes!!!
TQByteArray utf16 = e->encodedData("text/unicode"); TQByteArray utf16 = e->tqencodedData("text/tqunicode");
str = TQTextCodec::codecForName("utf16")->toUnicode(utf16); str = TQTextCodec::codecForName("utf16")->toUnicode(utf16);
return true; return true;
} }
if (e->provides("TEXT")) { // local encoding if (e->provides("TEXT")) { // local encoding
TQByteArray text = e->encodedData("TEXT"); TQByteArray text = e->tqencodedData("TEXT");
str = TQString(text); str = TQString(text);
return true; return true;
} }
if (e->provides("COMPOUND_TEXT")) { // local encoding if (e->provides("COMPOUND_TEXT")) { // local encoding
TQByteArray text = e->encodedData("COMPOUND_TEXT"); TQByteArray text = e->tqencodedData("COMPOUND_TEXT");
str = TQString(text); str = TQString(text);
return true; return true;
} }

@ -87,7 +87,7 @@ class ExtendedTextDrag : public TQTextDrag
static bool decode(const TQMimeSource *e, TQString &str, TQCString &subtype); static bool decode(const TQMimeSource *e, TQString &str, TQCString &subtype);
}; };
// Support KDE 3.3 and older PROTECTED KURLDrag::encodedData()! // Support KDE 3.3 and older PROTECTED KURLDrag::tqencodedData()!
#include <kurldrag.h> #include <kurldrag.h>
class KURLDrag2 : public KURLDrag class KURLDrag2 : public KURLDrag
@ -96,9 +96,9 @@ class KURLDrag2 : public KURLDrag
TQ_OBJECT TQ_OBJECT
public: public:
KURLDrag2(const KURL::List &urls) : KURLDrag(urls) {} KURLDrag2(const KURL::List &urls) : KURLDrag(urls) {}
TQByteArray encodedData2(const char *mime) const TQByteArray tqencodedData2(const char *mime) const
{ {
return encodedData(mime); return tqencodedData(mime);
} }
}; };

@ -19,7 +19,7 @@
***************************************************************************/ ***************************************************************************/
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlineedit.h> #include <tqlineedit.h>
#include <klineedit.h> #include <klineedit.h>
#include <kurlrequester.h> #include <kurlrequester.h>
@ -279,7 +279,7 @@ void HtmlEditor::cursorPositionChanged()
InlineEditors::instance()->richTextItalic->setChecked( textEdit()->italic() ); InlineEditors::instance()->richTextItalic->setChecked( textEdit()->italic() );
InlineEditors::instance()->richTextUnderline->setChecked( textEdit()->underline() ); InlineEditors::instance()->richTextUnderline->setChecked( textEdit()->underline() );
switch (textEdit()->alignment()) { switch (textEdit()->tqalignment()) {
default: default:
case 1/*TQt::AlignLeft*/: InlineEditors::instance()->richTextLeft->setChecked(true); break; case 1/*TQt::AlignLeft*/: InlineEditors::instance()->richTextLeft->setChecked(true); break;
case 4/*TQt::AlignCenter*/: InlineEditors::instance()->richTextCenter->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::setBold() { textEdit()->setBold( InlineEditors::instance()->richTextBold->isChecked() ); }
//void HtmlEditor::setItalic() { textEdit()->setItalic( InlineEditors::instance()->richTextItalic->isChecked() ); } //void HtmlEditor::setItalic() { textEdit()->setItalic( InlineEditors::instance()->richTextItalic->isChecked() ); }
//void HtmlEditor::setUnderline() { textEdit()->setUnderline( InlineEditors::instance()->richTextUnderline->isChecked() ); } //void HtmlEditor::setUnderline() { textEdit()->setUnderline( InlineEditors::instance()->richTextUnderline->isChecked() ); }
void HtmlEditor::setLeft() { textEdit()->setAlignment(TQt::AlignLeft); } void HtmlEditor::setLeft() { textEdit()->tqsetAlignment(TQt::AlignLeft); }
void HtmlEditor::setCentered() { textEdit()->setAlignment(TQt::AlignCenter); } void HtmlEditor::setCentered() { textEdit()->tqsetAlignment(TQt::AlignCenter); }
void HtmlEditor::setRight() { textEdit()->setAlignment(TQt::AlignRight); } void HtmlEditor::setRight() { textEdit()->tqsetAlignment(TQt::AlignRight); }
void HtmlEditor::setBlock() { textEdit()->setAlignment(TQt::AlignJustify); } void HtmlEditor::setBlock() { textEdit()->tqsetAlignment(TQt::AlignJustify); }
HtmlEditor::~HtmlEditor() HtmlEditor::~HtmlEditor()
{ {
@ -536,7 +536,7 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK
m_noteContent(contentNote) m_noteContent(contentNote)
{ {
TQWidget *page = plainPage(); TQWidget *page = plainPage();
TQGridLayout *layout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); TQGridLayout *tqlayout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint());
m_url = new KURLRequester(m_noteContent->url().url(), page); 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: m_autoIcon = new TQPushButton(i18n("Auto"), wid); // Create before to know size here:
/* Icon button: */ /* Icon button: */
m_icon->setIcon(m_noteContent->icon()); m_icon->setIcon(m_noteContent->icon());
int minSize = m_autoIcon->sizeHint().height(); int minSize = m_autoIcon->tqsizeHint().height();
// Make the icon button at least the same heigh than the other buttons for a better alignment (nicer to the eyes): // Make the icon button at least the same heigh than the other buttons for a better tqalignment (nicer to the eyes):
if (m_icon->sizeHint().height() < minSize) if (m_icon->tqsizeHint().height() < minSize)
m_icon->setFixedSize(minSize, minSize); m_icon->setFixedSize(minSize, minSize);
else else
m_icon->setFixedSize(m_icon->sizeHint().height(), m_icon->sizeHint().height()); // Make it square m_icon->setFixedSize(m_icon->tqsizeHint().height(), m_icon->tqsizeHint().height()); // Make it square
/* Auto button: */ /* Auto button: */
m_autoIcon->setToggleButton(true); m_autoIcon->setToggleButton(true);
m_autoIcon->setOn(m_noteContent->autoIcon()); m_autoIcon->setOn(m_noteContent->autoIcon());
@ -578,12 +578,12 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK
//m_url->setShowLocalProtocol(true); //m_url->setShowLocalProtocol(true);
TQLabel *label1 = new TQLabel(m_url, i18n("Ta&rget:"), page); TQLabel *label1 = new TQLabel(m_url, i18n("Ta&rget:"), page);
TQLabel *label2 = new TQLabel(m_title, i18n("&Title:"), page); TQLabel *label2 = new TQLabel(m_title, i18n("&Title:"), page);
layout->addWidget(label1, 0, 0, TQt::AlignVCenter); tqlayout->addWidget(label1, 0, 0, TQt::AlignVCenter);
layout->addWidget(label2, 1, 0, TQt::AlignVCenter); tqlayout->addWidget(label2, 1, 0, TQt::AlignVCenter);
layout->addWidget(label3, 2, 0, TQt::AlignVCenter); tqlayout->addWidget(label3, 2, 0, TQt::AlignVCenter);
layout->addWidget(m_url, 0, 1, TQt::AlignVCenter); tqlayout->addWidget(m_url, 0, 1, TQt::AlignVCenter);
layout->addWidget(wid1, 1, 1, TQt::AlignVCenter); tqlayout->addWidget(wid1, 1, 1, TQt::AlignVCenter);
layout->addWidget(wid, 2, 1, TQt::AlignVCenter); tqlayout->addWidget(wid, 2, 1, TQt::AlignVCenter);
m_isAutoModified = false; m_isAutoModified = false;
connect( m_url, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(urlChanged(const TQString&)) ); 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()) ); connect( m_autoIcon, TQT_SIGNAL(clicked()), this, TQT_SLOT(guessIcon()) );
TQWidget *stretchWidget = new TQWidget(page); TQWidget *stretchWidget = new TQWidget(page);
stretchWidget->setSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space stretchWidget->tqsetSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space
layout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); tqlayout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter);
urlChanged(""); urlChanged("");
@ -674,15 +674,15 @@ void LinkEditDialog::slotOk()
/* Change icon size if link look have changed */ /* Change icon size if link look have changed */
LinkLook *linkLook = LinkLook::lookForURL(filteredURL); LinkLook *linkLook = LinkLook::lookForURL(filteredURL);
TQString icon = m_icon->icon(); // When we change size, icon isn't changed and keep it's old size TQString icon = m_icon->icon(); // When we change size, icon isn't changed and keep it's old size
m_icon->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); // Reset size policy m_icon->tqsetSizePolicy(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->setIconSize(linkLook->iconSize()); // So I store it's name and reload it after size change !
m_icon->setIcon(icon); m_icon->setIcon(icon);
int minSize = m_autoIcon->sizeHint().height(); int minSize = m_autoIcon->tqsizeHint().height();
// Make the icon button at least the same heigh than the other buttons for a better alignment (nicer to the eyes): // Make the icon button at least the same heigh than the other buttons for a better tqalignment (nicer to the eyes):
if (m_icon->sizeHint().height() < minSize) if (m_icon->tqsizeHint().height() < minSize)
m_icon->setFixedSize(minSize, minSize); m_icon->setFixedSize(minSize, minSize);
else else
m_icon->setFixedSize(m_icon->sizeHint().height(), m_icon->sizeHint().height()); // Make it square m_icon->setFixedSize(m_icon->tqsizeHint().height(), m_icon->tqsizeHint().height()); // Make it square
KDialogBase::slotOk(); KDialogBase::slotOk();
} }
@ -695,7 +695,7 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p
m_noteContent(contentNote) m_noteContent(contentNote)
{ {
TQWidget *page = plainPage(); TQWidget *page = plainPage();
TQGridLayout *layout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint()); TQGridLayout *tqlayout = new TQGridLayout(page, /*nRows=*/4, /*nCols=*/2, /*margin=*/0, spacingHint());
KService service(contentNote->fullPath()); KService service(contentNote->fullPath());
@ -711,12 +711,12 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p
TQPushButton *guessButton = new TQPushButton(i18n("&Guess"), wid); TQPushButton *guessButton = new TQPushButton(i18n("&Guess"), wid);
/* Icon button: */ /* Icon button: */
m_icon->setIcon(service.icon()); m_icon->setIcon(service.icon());
int minSize = guessButton->sizeHint().height(); int minSize = guessButton->tqsizeHint().height();
// Make the icon button at least the same heigh than the other buttons for a better alignment (nicer to the eyes): // Make the icon button at least the same heigh than the other buttons for a better tqalignment (nicer to the eyes):
if (m_icon->sizeHint().height() < minSize) if (m_icon->tqsizeHint().height() < minSize)
m_icon->setFixedSize(minSize, minSize); m_icon->setFixedSize(minSize, minSize);
else else
m_icon->setFixedSize(m_icon->sizeHint().height(), m_icon->sizeHint().height()); // Make it square m_icon->setFixedSize(m_icon->tqsizeHint().height(), m_icon->tqsizeHint().height()); // Make it square
/* Guess button: */ /* Guess button: */
hLay->addWidget(m_icon); hLay->addWidget(m_icon);
hLay->addWidget(guessButton); 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 *label1 = new TQLabel(m_command->lineEdit(), i18n("Comman&d:"), page);
TQLabel *label2 = new TQLabel(m_name, i18n("&Name:"), page); TQLabel *label2 = new TQLabel(m_name, i18n("&Name:"), page);
layout->addWidget(label1, 0, 0, TQt::AlignVCenter); tqlayout->addWidget(label1, 0, 0, TQt::AlignVCenter);
layout->addWidget(label2, 1, 0, TQt::AlignVCenter); tqlayout->addWidget(label2, 1, 0, TQt::AlignVCenter);
layout->addWidget(label, 2, 0, TQt::AlignVCenter); tqlayout->addWidget(label, 2, 0, TQt::AlignVCenter);
layout->addWidget(m_command, 0, 1, TQt::AlignVCenter); tqlayout->addWidget(m_command, 0, 1, TQt::AlignVCenter);
layout->addWidget(m_name, 1, 1, TQt::AlignVCenter); tqlayout->addWidget(m_name, 1, 1, TQt::AlignVCenter);
layout->addWidget(wid, 2, 1, TQt::AlignVCenter); tqlayout->addWidget(wid, 2, 1, TQt::AlignVCenter);
TQWidget *stretchWidget = new TQWidget(page); TQWidget *stretchWidget = new TQWidget(page);
stretchWidget->setSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space stretchWidget->tqsetSizePolicy(TQSizePolicy(/*hor=*/TQSizePolicy::Fixed, /*ver=*/TQSizePolicy::Expanding, /*hStretch=*/1, /*vStretch=*/255)); // Make it fill ALL vertical space
layout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter); tqlayout->addWidget(stretchWidget, 3, 1, TQt::AlignVCenter);
connect( guessButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(guessIcon()) ); connect( guessButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(guessIcon()) );
} }
@ -805,7 +805,7 @@ void InlineEditors::initToolBars(KActionCollection *actionCollection)
// Init the RichTextEditor Toolbar: // Init the RichTextEditor Toolbar:
richTextFont = new FocusedFontCombo(Global::mainWindow()); richTextFont = new FocusedFontCombo(Global::mainWindow());
richTextFont->setFixedWidth(richTextFont->sizeHint().width() * 2 / 3); richTextFont->setFixedWidth(richTextFont->tqsizeHint().width() * 2 / 3);
richTextFont->setCurrentFont(defaultFont.family()); richTextFont->setCurrentFont(defaultFont.family());
KWidgetAction *action = new KWidgetAction(richTextFont, i18n("Font"), TQt::Key_F6, KWidgetAction *action = new KWidgetAction(richTextFont, i18n("Font"), TQt::Key_F6,
/*receiver=*/0, /*slot=*/"", actionCollection, "richtext_font"); /*receiver=*/0, /*slot=*/"", actionCollection, "richtext_font");
@ -816,7 +816,7 @@ void InlineEditors::initToolBars(KActionCollection *actionCollection)
/*receiver=*/0, /*slot=*/"", actionCollection, "richtext_font_size"); /*receiver=*/0, /*slot=*/"", actionCollection, "richtext_font_size");
richTextColor = new FocusedColorCombo(Global::mainWindow()); richTextColor = new FocusedColorCombo(Global::mainWindow());
richTextColor->setFixedWidth(richTextColor->sizeHint().height() * 2); richTextColor->setFixedWidth(richTextColor->tqsizeHint().height() * 2);
richTextColor->setColor(textColor); richTextColor->setColor(textColor);
action = new KWidgetAction(richTextColor, i18n("Color"), KShortcut(), 0, TQT_SLOT(), actionCollection, "richtext_color"); action = new KWidgetAction(richTextColor, i18n("Color"), KShortcut(), 0, TQT_SLOT(), actionCollection, "richtext_color");

@ -22,7 +22,7 @@
#define NOTEEDIT_H #define NOTEEDIT_H
#include <kdialogbase.h> #include <kdialogbase.h>
#include <textedit.h> #include <tqtextedit.h>
#include <tqlineedit.h> #include <tqlineedit.h>
class TQWidget; class TQWidget;

@ -25,7 +25,7 @@
#include <tqregexp.h> #include <tqregexp.h>
#include <kcolordrag.h> #include <kcolordrag.h>
#include <kurldrag.h> #include <kurldrag.h>
#include <stylesheet.h> #include <tqstylesheet.h>
#include <tqdir.h> #include <tqdir.h>
#include <kmimetype.h> #include <kmimetype.h>
#include <kmessagebox.h> #include <kmessagebox.h>
@ -36,7 +36,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <kfilemetainfo.h> #include <kfilemetainfo.h>
#include <kio/jobclasses.h> #include <kio/jobclasses.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include <kopenwith.h> #include <kopenwith.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <kicondialog.h> #include <kicondialog.h>
@ -264,7 +264,7 @@ TQString NoteFactory::createNoteLauncherFile(const TQString &command, const TQSt
"Name=%2\n" "Name=%2\n"
"Icon=%3\n" "Icon=%3\n"
"Encoding=UTF-8\n" "Encoding=UTF-8\n"
"Type=Application\n").arg(command, name, icon.isEmpty() ? TQString("exec") : icon); "Type=Application\n").tqarg(command, name, icon.isEmpty() ? TQString("exec") : icon);
TQString fileName = fileNameForNewNote(parent, "launcher.desktop"); TQString fileName = fileNameForNewNote(parent, "launcher.desktop");
TQString fullPath = parent->fullPathForFileName(fileName); TQString fullPath = parent->fullPathForFileName(fileName);
// parent->dontCareOfCreation(fullPath); // 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 if (source->provides("text/x-moz-url")) { // FOR MOZILLA
// Get the array and create a TQChar array of 1/2 of the size // Get the array and create a TQChar array of 1/2 of the size
TQByteArray mozilla = source->encodedData("text/x-moz-url"); TQByteArray mozilla = source->tqencodedData("text/x-moz-url");
TQMemArray<TQChar> chars( mozilla.count() / 2 ); TQMemArray<TQChar> chars( mozilla.count() / 2 );
// A small debug work to know the value of each bytes // A small debug work to know the value of each bytes
if (Global::debugWindow) 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>" 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>" "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 " "<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>").arg(kapp->aboutData()->programName()); "<a href=\"http://basket.kde.org/dropdb.php\">BasKet Drop Database</a>.</p>").tqarg(kapp->aboutData()->programName());
KMessageBox::information(parent, message, i18n("Unsupported MIME Type(s)"), KMessageBox::information(parent, message, i18n("Unsupported MIME Type(s)"),
"unsupportedDropInfo", KMessageBox::AllowLink); "unsupportedDropInfo", KMessageBox::AllowLink);
return note; 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: // Echo the length (in bytes) and then the data, and then same for next MIME type:
for (int i = 0; source->format(i); ++i) for (int i = 0; source->format(i); ++i)
if ( *(source->format(i)) ) { if ( *(source->format(i)) ) {
TQByteArray data = source->encodedData(source->format(i)); TQByteArray data = source->tqencodedData(source->format(i));
stream << (TQ_UINT32)data.count(); stream << (TQ_UINT32)data.count();
stream.writeRawBytes(data.data(), data.count()); stream.writeRawBytes(data.data(), data.count());
} }
@ -682,7 +682,7 @@ Note* NoteFactory::copyFileAndLoad(const KURL &url, Basket *parent)
if (Global::debugWindow) if (Global::debugWindow)
*Global::debugWindow << "copyFileAndLoad: " + url.prettyURL() + " to " + fullPath; *Global::debugWindow << "copyFileAndLoad: " + url.prettyURL() + " to " + fullPath;
// TQString annotations = i18n("Original file: %1").arg(url.prettyURL()); // TQString annotations = i18n("Original file: %1").tqarg(url.prettyURL());
// parent->dontCareOfCreation(fullPath); // parent->dontCareOfCreation(fullPath);
@ -710,7 +710,7 @@ Note* NoteFactory::moveFileAndLoad(const KURL &url, Basket *parent)
if (Global::debugWindow) if (Global::debugWindow)
*Global::debugWindow << "moveFileAndLoad: " + url.prettyURL() + " to " + fullPath; *Global::debugWindow << "moveFileAndLoad: " + url.prettyURL() + " to " + fullPath;
// TQString annotations = i18n("Original file: %1").arg(url.prettyURL()); // TQString annotations = i18n("Original file: %1").tqarg(url.prettyURL());
// parent->dontCareOfCreation(fullPath); // 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 (metaInfo.isEmpty()) { // metaInfo is empty for GIF files on my machine !
if (viewText && maybeText(url)) return NoteType::Text; if (viewText && maybeText(url)) return NoteType::Text;
else if (viewHTML && (maybeHtml(url))) return NoteType::Html; else if (viewHTML && (maybeHtml(url))) return NoteType::Html;
else if (viewImage && maybeAnimation(url)) return NoteType::Animation; // See Note::movieStatus(int) else if (viewImage && maybeAnimation(url)) return NoteType::Animation; // See Note::movietqStatus(int)
else if (viewImage && maybeImageOrAnimation(url)) return NoteType::Image; // for more explanations else if (viewImage && maybeImageOrAnimation(url)) return NoteType::Image; // for more explanations
else if (viewSound && maybeSound(url)) return NoteType::Sound; else if (viewSound && maybeSound(url)) return NoteType::Sound;
else if (maybeLauncher(url)) return NoteType::Launcher; else if (maybeLauncher(url)) return NoteType::Launcher;

@ -22,7 +22,7 @@
#ifdef HAVE_LIBGPGME #ifdef HAVE_LIBGPGME
#include <layout.h> #include <tqlayout.h>
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
#include <tqbuttongroup.h> #include <tqbuttongroup.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
@ -36,9 +36,9 @@ PasswordDlg::PasswordDlg(TQWidget *parent, const char *name)
:KDialogBase(Plain, i18n("Password Protection"), Ok|Cancel, Ok, :KDialogBase(Plain, i18n("Password Protection"), Ok|Cancel, Ok,
parent, name, /*modal=*/true, /*separator=*/true), w(0) parent, name, /*modal=*/true, /*separator=*/true), w(0)
{ {
TQHBoxLayout* toplayout = new TQHBoxLayout(plainPage(), 0, 0); TQHBoxLayout* toptqlayout = new TQHBoxLayout(plainPage(), 0, 0);
w = new Password(plainPage()); w = new Password(plainPage());
toplayout->addWidget(w, 1); toptqlayout->addWidget(w, 1);
} }
PasswordDlg::~PasswordDlg() PasswordDlg::~PasswordDlg()
@ -97,7 +97,7 @@ Password::Password(TQWidget *parent, const char *name)
for(KGpgKeyList::iterator it = list.begin(); it != list.end(); ++it) { for(KGpgKeyList::iterator it = list.begin(); it != list.end(); ++it) {
TQString name = gpg.checkForUtf8((*it).name); TQString name = gpg.checkForUtf8((*it).name);
keyCombo->insertItem(TQString("%1 <%2> %3").arg(name).arg((*it).email).arg((*it).id)); keyCombo->insertItem(TQString("%1 <%2> %3").tqarg(name).tqarg((*it).email).tqarg((*it).id));
} }
publicPrivateRadioButton->setEnabled(keyCombo->count() > 0); publicPrivateRadioButton->setEnabled(keyCombo->count() > 0);
keyCombo->setEnabled(keyCombo->count() > 0); keyCombo->setEnabled(keyCombo->count() > 0);

@ -60,7 +60,7 @@
</widget> </widget>
<widget class="TQLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>tqlayout2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -104,7 +104,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>6</height> <height>6</height>

@ -43,7 +43,7 @@
void PopupMenu::execAtRectCenter(TQPopupMenu &menu, const TQRect &rect) void PopupMenu::execAtRectCenter(TQPopupMenu &menu, const TQRect &rect)
{ {
// Compute point where to popup the menu that should be centered : // Compute point where to popup the menu that should be centered :
TQSize menuSize = menu.sizeHint(); TQSize menuSize = menu.tqsizeHint();
TQSize menuHalfSize = menuSize / 2; TQSize menuHalfSize = menuSize / 2;
TQPoint point = rect.center() - TQPoint(menuHalfSize.width(), menuHalfSize.height()); 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) void PopupMenu::execAtRectBottom(TQPopupMenu &menu, const TQRect &rect, bool centered)
{ {
TQSize menuSize = menu.sizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)] TQSize menuSize = menu.tqsizeHint() - 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 desktopWidth = kapp->desktop()->width(); // to be compared/added/substracted with TQRects/TQPoints...
int desktopHeight = kapp->desktop()->height(); 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) void PopupMenu::execAtRectRight(TQPopupMenu &menu, const TQRect &rect, bool centered)
{ {
TQSize menuSize = menu.sizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)] TQSize menuSize = menu.tqsizeHint() - 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 desktopWidth = kapp->desktop()->width(); // to be compared/added/substracted with TQRects/TQPoints...
int desktopHeight = kapp->desktop()->height(); int desktopHeight = kapp->desktop()->height();

@ -108,7 +108,7 @@ void TQAlphaWidget::run( int time )
widget->setWState( WState_Visible ); widget->setWState( WState_Visible );
move( widget->geometry().x(),widget->geometry().y() ); move( widget->tqgeometry().x(),widget->tqgeometry().y() );
resize( widget->size().width(), widget->size().height() ); resize( widget->size().width(), widget->size().height() );
front = TQImage( widget->size(), 32 ); front = TQImage( widget->size(), 32 );
@ -116,8 +116,8 @@ void TQAlphaWidget::run( int time )
back = TQImage( widget->size(), 32 ); back = TQImage( widget->size(), 32 );
back = TQPixmap::grabWindow( TQApplication::desktop()->winId(), back = TQPixmap::grabWindow( TQApplication::desktop()->winId(),
widget->geometry().x(), widget->geometry().y(), widget->tqgeometry().x(), widget->tqgeometry().y(),
widget->geometry().width(), widget->geometry().height() ); widget->tqgeometry().width(), widget->tqgeometry().height() );
if ( !back.isNull() && checkTime.elapsed() < duration / 2 ) { if ( !back.isNull() && checkTime.elapsed() < duration / 2 ) {
mixed = back.copy(); mixed = back.copy();
@ -142,7 +142,7 @@ bool TQAlphaWidget::eventFilter( TQObject* o, TQEvent* e )
case TQEvent::Move: case TQEvent::Move:
if ( o != widget ) if ( o != widget )
break; break;
move( widget->geometry().x(),widget->geometry().y() ); move( widget->tqgeometry().x(),widget->tqgeometry().y() );
update(); update();
break; break;
case TQEvent::Hide: case TQEvent::Hide:
@ -251,7 +251,7 @@ void TQAlphaWidget::render()
widget->clearWState( WState_ForceHide ); widget->clearWState( WState_ForceHide );
alphaBlend(); alphaBlend();
pm = mixed; pm = mixed;
repaint( FALSE ); tqrepaint( FALSE );
} }
} }
@ -311,8 +311,8 @@ TQRollEffect::TQRollEffect( TQWidget* w, WFlags f, DirFlags orient )
totalWidth = widget->width(); totalWidth = widget->width();
totalHeight = widget->height(); totalHeight = widget->height();
} else { } else {
totalWidth = widget->sizeHint().width(); totalWidth = widget->tqsizeHint().width();
totalHeight = widget->sizeHint().height(); totalHeight = widget->tqsizeHint().height();
} }
currentHeight = totalHeight; currentHeight = totalHeight;
@ -348,7 +348,7 @@ bool TQRollEffect::eventFilter( TQObject* o, TQEvent* e )
case TQEvent::Move: case TQEvent::Move:
if ( o != widget ) if ( o != widget )
break; break;
move( widget->geometry().x(),widget->geometry().y() ); move( widget->tqgeometry().x(),widget->tqgeometry().y() );
update(); update();
break; break;
case TQEvent::Hide: case TQEvent::Hide:
@ -438,7 +438,7 @@ void TQRollEffect::run( int time )
widget->setWState( WState_Visible ); widget->setWState( WState_Visible );
move( widget->geometry().x(),widget->geometry().y() ); move( widget->tqgeometry().x(),widget->tqgeometry().y() );
resize( TQMIN( currentWidth, totalWidth ), TQMIN( currentHeight, totalHeight ) ); resize( TQMIN( currentWidth, totalWidth ), TQMIN( currentHeight, totalHeight ) );
show(); show();
@ -484,8 +484,8 @@ void TQRollEffect::scroll()
int w = totalWidth; int w = totalWidth;
int h = totalHeight; int h = totalHeight;
int x = widget->geometry().x(); int x = widget->tqgeometry().x();
int y = widget->geometry().y(); int y = widget->tqgeometry().y();
if ( orientation & RightScroll || orientation & LeftScroll ) if ( orientation & RightScroll || orientation & LeftScroll )
w = TQMIN( currentWidth, totalWidth ); w = TQMIN( currentWidth, totalWidth );
@ -494,15 +494,15 @@ void TQRollEffect::scroll()
setUpdatesEnabled( FALSE ); setUpdatesEnabled( FALSE );
if ( orientation & UpScroll ) if ( orientation & UpScroll )
y = widget->geometry().y() + TQMAX( 0, totalHeight - currentHeight ); y = widget->tqgeometry().y() + TQMAX( 0, totalHeight - currentHeight );
if ( orientation & LeftScroll ) if ( orientation & LeftScroll )
x = widget->geometry().x() + TQMAX( 0, totalWidth - currentWidth ); x = widget->tqgeometry().x() + TQMAX( 0, totalWidth - currentWidth );
if ( orientation & UpScroll || orientation & LeftScroll ) if ( orientation & UpScroll || orientation & LeftScroll )
move( x, y ); move( x, y );
resize( w, h ); resize( w, h );
setUpdatesEnabled( TRUE ); setUpdatesEnabled( TRUE );
repaint( FALSE ); tqrepaint( FALSE );
} }
if ( done ) { if ( done ) {
anim.stop(); anim.stop();

@ -23,7 +23,7 @@
#include <tqapplication.h> #include <tqapplication.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <palette.h> #include <tqpalette.h>
#include <tqstyle.h> #include <tqstyle.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <tqtooltip.h> #include <tqtooltip.h>
@ -43,8 +43,8 @@ SizeTip::SizeTip( TQWidget *parent, const char *name )
void SizeTip::setTip( const TQRect &rect ) void SizeTip::setTip( const TQRect &rect )
{ {
TQString tip = TQString( "%1x%2" ).arg( rect.width() ) TQString tip = TQString( "%1x%2" ).tqarg( rect.width() )
.arg( rect.height() ); .tqarg( rect.height() );
setText( tip ); setText( tip );
adjustSize(); adjustSize();
@ -54,7 +54,7 @@ void SizeTip::setTip( const TQRect &rect )
void SizeTip::positionTip( const TQRect &rect ) void SizeTip::positionTip( const TQRect &rect )
{ {
TQRect tipRect = geometry(); TQRect tipRect = tqgeometry();
tipRect.moveTopLeft( TQPoint( 0, 0 ) ); tipRect.moveTopLeft( TQPoint( 0, 0 ) );
if ( rect.intersects( tipRect ) ) if ( rect.intersects( tipRect ) )
@ -63,7 +63,7 @@ void SizeTip::positionTip( const TQRect &rect )
tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) ); tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) );
if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) ) if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) )
tipRect.moveBottomRight( geometry().bottomRight() ); tipRect.moveBottomRight( tqgeometry().bottomRight() );
} }
move( tipRect.topLeft() ); move( tipRect.topLeft() );
@ -94,7 +94,7 @@ void RegionGrabber::initGrabber()
TQDesktopWidget desktopWidget; TQDesktopWidget desktopWidget;
TQRect desktopSize; TQRect desktopSize;
if ( desktopWidget.isVirtualDesktop() ) if ( desktopWidget.isVirtualDesktop() )
desktopSize = desktopWidget.geometry(); desktopSize = desktopWidget.tqgeometry();
else else
desktopSize = desktopWidget.screenGeometry( qt_xrootwin() ); desktopSize = desktopWidget.screenGeometry( qt_xrootwin() );
@ -171,8 +171,8 @@ void RegionGrabber::drawRubber()
p.setPen( TQPen( color0, 1 ) ); p.setPen( TQPen( color0, 1 ) );
p.setBrush( NoBrush ); p.setBrush( NoBrush );
tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, colorGroup(), tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, tqcolorGroup(),
TQStyle::Style_Default, TQStyleOption( colorGroup().base() ) ); TQStyle::Style_Default, TQStyleOption( tqcolorGroup().base() ) );
p.end(); p.end();
} }

@ -19,7 +19,7 @@
***************************************************************************/ ***************************************************************************/
#include <config.h> #include <config.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlineedit.h> #include <tqlineedit.h>
#include <tqhbox.h> #include <tqhbox.h>
#include <tqvbox.h> #include <tqvbox.h>
@ -357,12 +357,12 @@ void Settings::setAutoBullet(bool yes)
GeneralPage::GeneralPage(TQWidget * parent, const char * name) GeneralPage::GeneralPage(TQWidget * parent, const char * name)
: KCModule(parent, name) : KCModule(parent, name)
{ {
TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
TQHBoxLayout *hLay; TQHBoxLayout *hLay;
TQLabel *label; TQLabel *label;
HelpLabel *hLabel; HelpLabel *hLabel;
TQGridLayout *gl = new TQGridLayout(layout, /*nRows=*/3, /*nCols=*/3); TQGridLayout *gl = new TQGridLayout(tqlayout, /*nRows=*/3, /*nCols=*/3);
gl->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding), 0, 2); gl->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding), 0, 2);
// Basket Tree Position: // Basket Tree Position:
@ -394,16 +394,16 @@ GeneralPage::GeneralPage(TQWidget * parent, const char * name)
"on that icon to paste the current selection.") + "</p>" + "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("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>") "<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>")
.arg(kapp->aboutData()->programName()), .tqarg(kapp->aboutData()->programName()),
this); this);
hLay->addWidget(m_usePassivePopup); hLay->addWidget(m_usePassivePopup);
hLay->addWidget(hLabel); hLay->addWidget(hLabel);
hLay->addStretch(); hLay->addStretch();
layout->addLayout(hLay); tqlayout->addLayout(hLay);
// System Tray Icon: // System Tray Icon:
TQGroupBox *gbSys = new TQGroupBox(3, Qt::Vertical, i18n("System Tray Icon"), this); TQGroupBox *gbSys = new TQGroupBox(3, Qt::Vertical, i18n("System Tray Icon"), this);
layout->addWidget(gbSys); tqlayout->addWidget(gbSys);
TQVBoxLayout *sysLay = new TQVBoxLayout(gbSys, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *sysLay = new TQVBoxLayout(gbSys, /*margin=*/0, KDialogBase::spacingHint());
// Dock in System Tray: // 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)) ); connect( m_useSystray, TQT_SIGNAL(toggled(bool)), m_systray, TQT_SLOT(setEnabled(bool)) );
layout->insertStretch(-1); tqlayout->insertStretch(-1);
load(); load();
} }
@ -502,14 +502,14 @@ void GeneralPage::defaults()
BasketsPage::BasketsPage(TQWidget * parent, const char * name) BasketsPage::BasketsPage(TQWidget * parent, const char * name)
: KCModule(parent, name) : KCModule(parent, name)
{ {
TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
TQHBoxLayout *hLay; TQHBoxLayout *hLay;
HelpLabel *hLabel; HelpLabel *hLabel;
// Appearance: // Appearance:
TQGroupBox *appearanceBox = new TQGroupBox(3, Qt::Vertical, i18n("Appearance"), this); TQGroupBox *appearanceBox = new TQGroupBox(3, Qt::Vertical, i18n("Appearance"), this);
layout->addWidget(appearanceBox); tqlayout->addWidget(appearanceBox);
m_playAnimations = new TQCheckBox(i18n("Ani&mate changes in baskets"), appearanceBox); m_playAnimations = new TQCheckBox(i18n("Ani&mate changes in baskets"), appearanceBox);
connect( m_playAnimations, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); connect( m_playAnimations, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) );
@ -523,7 +523,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name)
// Behavior: // Behavior:
TQGroupBox *behaviorBox = new TQGroupBox(5, Qt::Vertical, i18n("Behavior"), this); TQGroupBox *behaviorBox = new TQGroupBox(5, Qt::Vertical, i18n("Behavior"), this);
layout->addWidget(behaviorBox); tqlayout->addWidget(behaviorBox);
m_autoBullet = new TQCheckBox(i18n("&Transform lines starting with * or - to lists in text editors"), 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()) ); 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(m_groupOnInsertionLine);
hLayV->addWidget(helpV); hLayV->addWidget(helpV);
hLayV->insertStretch(-1); hLayV->insertStretch(-1);
layout->addWidget(m_groupOnInsertionLineWidget); tqlayout->addWidget(m_groupOnInsertionLineWidget);
connect(m_groupOnInsertionLine, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); connect(m_groupOnInsertionLine, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()));
widget = new TQWidget(behaviorBox); widget = new TQWidget(behaviorBox);
@ -594,7 +594,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name)
// Protection: // Protection:
TQGroupBox *protectionBox = new TQGroupBox(3, Qt::Vertical, i18n("Password Protection"), this); TQGroupBox *protectionBox = new TQGroupBox(3, Qt::Vertical, i18n("Password Protection"), this);
layout->addWidget(protectionBox); tqlayout->addWidget(protectionBox);
widget = new TQWidget(protectionBox); widget = new TQWidget(protectionBox);
// Re-Lock timeout configuration // Re-Lock timeout configuration
@ -608,7 +608,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name)
//label = new TQLabel(i18n("minutes"), this); //label = new TQLabel(i18n("minutes"), this);
//hLay->addWidget(label); //hLay->addWidget(label);
hLay->addStretch(); hLay->addStretch();
// layout->addLayout(hLay); // tqlayout->addLayout(hLay);
connect( m_enableReLockTimeoutMinutes, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); connect( m_enableReLockTimeoutMinutes, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) );
connect( m_reLockTimeoutMinutes, TQT_SIGNAL(valueChanged(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)) ); 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()) ); connect( m_useGnuPGAgent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) );
#endif #endif
layout->insertStretch(-1); tqlayout->insertStretch(-1);
load(); load();
} }
@ -682,7 +682,7 @@ void BasketsPage::defaults()
NewNotesPage::NewNotesPage(TQWidget * parent, const char * name) NewNotesPage::NewNotesPage(TQWidget * parent, const char * name)
: KCModule(parent, name) : KCModule(parent, name)
{ {
TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
TQHBoxLayout *hLay; TQHBoxLayout *hLay;
TQLabel *label; TQLabel *label;
@ -697,7 +697,7 @@ NewNotesPage::NewNotesPage(TQWidget * parent, const char * name)
hLay->addWidget(label); hLay->addWidget(label);
hLay->addWidget(m_newNotesPlace); hLay->addWidget(m_newNotesPlace);
hLay->addStretch(); hLay->addStretch();
//layout->addLayout(hLay); //tqlayout->addLayout(hLay);
label->hide(); label->hide();
m_newNotesPlace->hide(); m_newNotesPlace->hide();
connect( m_newNotesPlace, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()) ); 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); m_pushVisualize = new TQPushButton(i18n("&Visualize..."), this);
hLay->addWidget(m_pushVisualize); hLay->addWidget(m_pushVisualize);
hLay->addStretch(); hLay->addStretch();
layout->addLayout(hLay); tqlayout->addLayout(hLay);
connect( m_pushVisualize, TQT_SIGNAL(clicked()), this, TQT_SLOT(visualize()) ); connect( m_pushVisualize, TQT_SIGNAL(clicked()), this, TQT_SLOT(visualize()) );
// View File Content: // View File Content:
@ -736,13 +736,13 @@ NewNotesPage::NewNotesPage(TQWidget * parent, const char * name)
m_viewHtmlFileContent = new TQCheckBox( i18n("&HTML page"), buttonGroup ); m_viewHtmlFileContent = new TQCheckBox( i18n("&HTML page"), buttonGroup );
m_viewImageFileContent = new TQCheckBox( i18n("&Image or animation"), buttonGroup ); m_viewImageFileContent = new TQCheckBox( i18n("&Image or animation"), buttonGroup );
m_viewSoundFileContent = new TQCheckBox( i18n("&Sound"), buttonGroup ); m_viewSoundFileContent = new TQCheckBox( i18n("&Sound"), buttonGroup );
layout->addWidget(buttonGroup); tqlayout->addWidget(buttonGroup);
connect( m_viewTextFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); connect( m_viewTextFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) );
connect( m_viewHtmlFileContent, 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_viewImageFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) );
connect( m_viewSoundFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); connect( m_viewSoundFileContent, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) );
layout->insertStretch(-1); tqlayout->insertStretch(-1);
load(); load();
} }
@ -790,15 +790,15 @@ void NewNotesPage::visualize()
NotesAppearancePage::NotesAppearancePage(TQWidget * parent, const char * name) NotesAppearancePage::NotesAppearancePage(TQWidget * parent, const char * name)
: KCModule(parent, name) : KCModule(parent, name)
{ {
TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
TQTabWidget *tabs = new TQTabWidget(this); TQTabWidget *tabs = new TQTabWidget(this);
layout->addWidget(tabs); tqlayout->addWidget(tabs);
m_soundLook = new LinkLookEditWidget(this, i18n("Conference audio record"), "sound", tabs); m_soundLook = new LinkLookEditWidget(this, i18n("Conference audio record"), "sound", tabs);
m_fileLook = new LinkLookEditWidget(this, i18n("Annual report"), "document", tabs); m_fileLook = new LinkLookEditWidget(this, i18n("Annual report"), "document", tabs);
m_localLinkLook = new LinkLookEditWidget(this, i18n("Home folder"), "folder_home", 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_networkLinkLook = new LinkLookEditWidget(this, "www.kde.org", KMimeType::iconForURL("http://www.kde.org"), tabs);
m_launcherLook = new LinkLookEditWidget(this, i18n("Launch %1").arg(kapp->aboutData()->programName()), "basket", tabs); m_launcherLook = new LinkLookEditWidget(this, i18n("Launch %1").tqarg(kapp->aboutData()->programName()), "basket", tabs);
tabs->addTab(m_soundLook, i18n("&Sounds") ); tabs->addTab(m_soundLook, i18n("&Sounds") );
tabs->addTab(m_fileLook, i18n("&Files") ); tabs->addTab(m_fileLook, i18n("&Files") );
tabs->addTab(m_localLinkLook, i18n("&Local Links") ); tabs->addTab(m_localLinkLook, i18n("&Local Links") );
@ -838,7 +838,7 @@ ApplicationsPage::ApplicationsPage(TQWidget * parent, const char * name)
: KCModule(parent, name) : KCModule(parent, name)
{ {
/* Applications page */ /* Applications page */
TQVBoxLayout *layout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQVBoxLayout *tqlayout = new TQVBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
m_htmlUseProg = new TQCheckBox(i18n("Open &text notes with a custom application:"), this); m_htmlUseProg = new TQCheckBox(i18n("Open &text notes with a custom application:"), this);
m_htmlProg = new RunCommandRequester("", i18n("Open text notes with:"), 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_animationProg, whatsthis);
TQWhatsThis::add(m_soundProg, whatsthis); TQWhatsThis::add(m_soundProg, whatsthis);
layout->addWidget(m_htmlUseProg); tqlayout->addWidget(m_htmlUseProg);
layout->addItem(hLayH); tqlayout->addItem(hLayH);
layout->addWidget(m_imageUseProg); tqlayout->addWidget(m_imageUseProg);
layout->addItem(hLayI); tqlayout->addItem(hLayI);
layout->addWidget(m_animationUseProg); tqlayout->addWidget(m_animationUseProg);
layout->addItem(hLayA); tqlayout->addItem(hLayA);
layout->addWidget(m_soundUseProg); tqlayout->addWidget(m_soundUseProg);
layout->addItem(hLayS); tqlayout->addItem(hLayS);
layout->addSpacing(KDialogBase::spacingHint()); tqlayout->addSpacing(KDialogBase::spacingHint());
TQHBoxLayout *hLay = new TQHBoxLayout(0L, /*margin=*/0, /*spacing=*/0); TQHBoxLayout *hLay = new TQHBoxLayout(0L, /*margin=*/0, /*spacing=*/0);
HelpLabel *hl1 = new HelpLabel( HelpLabel *hl1 = new HelpLabel(
@ -918,7 +918,7 @@ ApplicationsPage::ApplicationsPage(TQWidget * parent, const char * name)
this); this);
hLay->addWidget(hl1); hLay->addWidget(hl1);
hLay->addStretch(); hLay->addStretch();
layout->addLayout(hLay); tqlayout->addLayout(hLay);
hLay = new TQHBoxLayout(0L, /*margin=*/0, /*spacing=*/0); hLay = new TQHBoxLayout(0L, /*margin=*/0, /*spacing=*/0);
HelpLabel *hl2 = new HelpLabel( HelpLabel *hl2 = new HelpLabel(
@ -938,14 +938,14 @@ ApplicationsPage::ApplicationsPage(TQWidget * parent, const char * name)
this); this);
hLay->addWidget(hl2); hLay->addWidget(hl2);
hLay->addStretch(); hLay->addStretch();
layout->addLayout(hLay); tqlayout->addLayout(hLay);
connect( m_htmlUseProg, TQT_SIGNAL(toggled(bool)), m_htmlProg, TQT_SLOT(setEnabled(bool)) ); 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_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_animationUseProg, TQT_SIGNAL(toggled(bool)), m_animationProg, TQT_SLOT(setEnabled(bool)) );
connect( m_soundUseProg, TQT_SIGNAL(toggled(bool)), m_soundProg, TQT_SLOT(setEnabled(bool)) ); connect( m_soundUseProg, TQT_SIGNAL(toggled(bool)), m_soundProg, TQT_SLOT(setEnabled(bool)) );
layout->insertStretch(-1); tqlayout->insertStretch(-1);
load(); load();
} }

@ -24,11 +24,11 @@
#include <klocale.h> #include <klocale.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <tqptrstack.h> #include <tqptrstack.h>
#include <layout.h> #include <tqlayout.h>
#include <tqvbuttongroup.h> #include <tqvbuttongroup.h>
#include <tqradiobutton.h> #include <tqradiobutton.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <textedit.h> #include <tqtextedit.h>
#include "softwareimporters.h" #include "softwareimporters.h"
#include "basket.h" #include "basket.h"
@ -216,7 +216,7 @@ void SoftwareImporters::finishImport(Basket *basket)
// Focus the FIRST note (the last inserted note is currently focused!): // Focus the FIRST note (the last inserted note is currently focused!):
basket->setFocusedNote(basket->firstNoteShownInStack()); basket->setFocusedNote(basket->firstNoteShownInStack());
// Relayout every notes at theire new place and simulate a load animation (because already loaded just after the creation). // Retqlayout 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: // 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->relayoutNotes(/*animate=*/false);
basket->animateLoad(); basket->animateLoad();
@ -491,7 +491,7 @@ void SoftwareImporters::importTextFile()
); );
// First create a basket for it: // First create a basket for it:
TQString title = i18n("From TextFile.txt", "From %1").arg(KURL(fileName).fileName()); TQString title = i18n("From TextFile.txt", "From %1").tqarg(KURL(fileName).fileName());
BasketFactory::newBasket(/*icon=*/"txt", title, /*backgroundImage=*/"", /*backgroundColor=*/TQColor(), /*textColor=*/TQColor(), /*templateName=*/"1column", /*createIn=*/0); BasketFactory::newBasket(/*icon=*/"txt", title, /*backgroundImage=*/"", /*backgroundColor=*/TQColor(), /*textColor=*/TQColor(), /*templateName=*/"1column", /*createIn=*/0);
Basket *basket = Global::bnpView->currentBasket(); Basket *basket = Global::bnpView->currentBasket();
basket->load(); basket->load();

@ -121,7 +121,7 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu)
// kapp->widgetAt(g + TQPoint(tw-1, 0)) != this || // kapp->widgetAt(g + TQPoint(tw-1, 0)) != this ||
// kapp->widgetAt(g + TQPoint(0, th-1)) != this || // kapp->widgetAt(g + TQPoint(0, th-1)) != this ||
// kapp->widgetAt(g + TQPoint(tw-1, th-1)) != this) { // kapp->widgetAt(g + TQPoint(tw-1, th-1)) != this) {
int systrayManagerWinId = topLevelWidget()->winId(); int systrayManagerWinId = tqtopLevelWidget()->winId();
KWin::forceActiveWindow(systrayManagerWinId); KWin::forceActiveWindow(systrayManagerWinId);
kapp->processEvents(); // Because without it the systrayManager is raised only after the messageBox is displayed kapp->processEvents(); // Because without it the systrayManager is raised only after the messageBox is displayed
// KWin::activateWindow(systrayManagerWinId); // KWin::activateWindow(systrayManagerWinId);
@ -139,7 +139,7 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu)
TQString message = i18n( TQString message = i18n(
"<p>Closing the main window will keep %1 running in the system tray. " "<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>" "Use <b>Quit</b> from the <b>Basket</b> menu to quit the application.</p>"
).arg(KGlobal::instance()->aboutData()->programName()); ).tqarg(KGlobal::instance()->aboutData()->programName());
// We are sure the systray icon is visible: ouf! // We are sure the systray icon is visible: ouf!
if (useSystray) { if (useSystray) {
// Compute size and position of the pixmap to be grabbed: // Compute size and position of the pixmap to be grabbed:
@ -161,10 +161,10 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu)
const int IMAGE_BORDER = 1; const int IMAGE_BORDER = 1;
int ax = g.x() - x - CIRCLE_MARGINS - 1; int ax = g.x() - x - CIRCLE_MARGINS - 1;
int ay = g.y() - y - CIRCLE_MARGINS - 1; int ay = g.y() - y - CIRCLE_MARGINS - 1;
painter.setPen( TQPen(KApplication::palette().active().dark(), CIRCLE_WIDTH) ); painter.setPen( TQPen(KApplication::tqpalette().active().dark(), CIRCLE_WIDTH) );
painter.drawArc(ax + SHADOW_OFFSET, ay + SHADOW_OFFSET, painter.drawArc(ax + SHADOW_OFFSET, ay + SHADOW_OFFSET,
tw + 2*CIRCLE_MARGINS, th + 2*CIRCLE_MARGINS, 0, 16*360); tw + 2*CIRCLE_MARGINS, th + 2*CIRCLE_MARGINS, 0, 16*360);
painter.setPen( TQPen(TQt::red/*KApplication::palette().active().highlight()*/, CIRCLE_WIDTH) ); painter.setPen( TQPen(TQt::red/*KApplication::tqpalette().active().highlight()*/, CIRCLE_WIDTH) );
painter.drawArc(ax, ay, tw + 2*CIRCLE_MARGINS, th + 2*CIRCLE_MARGINS, 0, 16*360); painter.drawArc(ax, ay, tw + 2*CIRCLE_MARGINS, th + 2*CIRCLE_MARGINS, 0, 16*360);
#if 1 #if 1
// Draw the pixmap over the screenshot in case a window hide the icon: // 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: // Then, we add a border arround the image to make it more visible:
TQPixmap finalShot(w + 2*IMAGE_BORDER, h + 2*IMAGE_BORDER); TQPixmap finalShot(w + 2*IMAGE_BORDER, h + 2*IMAGE_BORDER);
finalShot.fill(KApplication::palette().active().foreground()); finalShot.fill(KApplication::tqpalette().active().foreground());
painter.begin(&finalShot); painter.begin(&finalShot);
painter.drawPixmap(IMAGE_BORDER, IMAGE_BORDER, shot); painter.drawPixmap(IMAGE_BORDER, IMAGE_BORDER, shot);
painter.end(); painter.end();
@ -433,7 +433,7 @@ void SystemTray::updateToolTipDelayed()
TQString tip = "<p><nobr>" + ( basket->isLocked() ? kapp->makeStdCaption(i18n("%1 (Locked)")) TQString tip = "<p><nobr>" + ( basket->isLocked() ? kapp->makeStdCaption(i18n("%1 (Locked)"))
: kapp->makeStdCaption( "%1") ) : kapp->makeStdCaption( "%1") )
.arg(Tools::textToHTMLWithoutP(basket->basketName())); .tqarg(Tools::textToHTMLWithoutP(basket->basketName()));
TQToolTip::add(this, tip); TQToolTip::add(this, tip);
} }

@ -77,7 +77,7 @@ TQString State::fullName()
{ {
if (!parentTag() || parentTag()->states().count() == 1) if (!parentTag() || parentTag()->states().count() == 1)
return (name().isEmpty() && parentTag() ? parentTag()->name() : name()); return (name().isEmpty() && parentTag() ? parentTag()->name() : name());
return TQString(i18n("%1: %2")).arg(parentTag()->name(), name()); return TQString(i18n("%1: %2")).tqarg(parentTag()->name(), name());
} }
TQFont State::font(TQFont base) TQFont State::font(TQFont base)
@ -541,9 +541,9 @@ void Tag::createDefaultTagsSet(const TQString &fullPath)
" </state>\n" " </state>\n"
" </tag>\n" " </tag>\n"
"\n") "\n")
.arg( i18n("To Do"), i18n("Unchecked"), i18n("Done") ) // %1 %2 %3 .tqarg( i18n("To Do"), i18n("Unchecked"), i18n("Done") ) // %1 %2 %3
.arg( i18n("Progress"), i18n("0 %"), i18n("25 %") ) // %4 %5 %6 .tqarg( i18n("Progress"), i18n("0 %"), i18n("25 %") ) // %4 %5 %6
.arg( i18n("50 %"), i18n("75 %"), i18n("100 %") ) // %7 %8 %9 .tqarg( i18n("50 %"), i18n("75 %"), i18n("100 %") ) // %7 %8 %9
+ TQString( + TQString(
" <tag>\n" " <tag>\n"
" <name>%1</name>\n" // "Priority" " <name>%1</name>\n" // "Priority"
@ -596,9 +596,9 @@ void Tag::createDefaultTagsSet(const TQString &fullPath)
" </state>\n" " </state>\n"
" </tag>\n" " </tag>\n"
"\n") "\n")
.arg( i18n("Priority"), i18n("Low"), i18n("Medium") ) // %1 %2 %3 .tqarg( i18n("Priority"), i18n("Low"), i18n("Medium") ) // %1 %2 %3
.arg( i18n("High"), i18n("Preference"), i18n("Bad") ) // %4 %5 %6 .tqarg( i18n("High"), i18n("Preference"), i18n("Bad") ) // %4 %5 %6
.arg( i18n("Good"), i18n("Excellent"), i18n("Highlight") ) // %7 %8 %9 .tqarg( i18n("Good"), i18n("Excellent"), i18n("Highlight") ) // %7 %8 %9
+ TQString( + TQString(
" <tag>\n" " <tag>\n"
" <name>%1</name>\n" // "Important" " <name>%1</name>\n" // "Important"
@ -664,9 +664,9 @@ void Tag::createDefaultTagsSet(const TQString &fullPath)
" </state>\n" " </state>\n"
" </tag>""\n" " </tag>""\n"
"\n") "\n")
.arg( i18n("Important"), i18n("Very Important"), i18n("Information") ) // %1 %2 %3 .tqarg( i18n("Important"), i18n("Very Important"), i18n("Information") ) // %1 %2 %3
.arg( i18n("Idea"), i18n("The initial of 'Idea'", "I."), i18n("Title") ) // %4 %5 %6 .tqarg( 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 .tqarg( i18n("Code"), i18n("Work"), i18n("The initial of 'Work'", "W.") ) // %7 %8 %9
+ TQString( + TQString(
" <tag>\n" " <tag>\n"
" <state id=\"personal\">\n" " <state id=\"personal\">\n"
@ -684,7 +684,7 @@ void Tag::createDefaultTagsSet(const TQString &fullPath)
" </tag>\n" " </tag>\n"
"</basketTags>\n" "</basketTags>\n"
"") "")
.arg( i18n("Personal"), i18n("The initial of 'Personal'", "P."), i18n("Funny") ); // %1 %2 %3 .tqarg( i18n("Personal"), i18n("The initial of 'Personal'", "P."), i18n("Funny") ); // %1 %2 %3
// Write to Disk: // Write to Disk:
TQFile file(fullPath); TQFile file(fullPath);
@ -768,7 +768,7 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac
} }
} }
TQSize IndentedMenuItem::sizeHint() TQSize IndentedMenuItem::tqsizeHint()
{ {
int iconSize = KIcon::SizeSmall; int iconSize = KIcon::SizeSmall;
int iconMargin = StateMenuItem::iconMargin(); int iconMargin = StateMenuItem::iconMargin();
@ -841,7 +841,7 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ
} }
} }
TQSize StateMenuItem::sizeHint() TQSize StateMenuItem::tqsizeHint()
{ {
int iconSize = 16; // We use 16 instead of KIcon::SizeSmall (the size of icons in menus) because tags will always be 16*16 icons 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()); TQFont theFont = m_state->font(KGlobalSettings::menuFont());
@ -851,15 +851,15 @@ TQSize StateMenuItem::sizeHint()
TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg)
{ {
int width = kapp->tqstyle().pixelMetric(TQStyle::PM_IndicatorWidth, 0); int width = kapp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth, 0);
int height = kapp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight, 0); int height = kapp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight, 0);
TQRect rect(0, 0, width, height); TQRect rect(0, 0, width, height);
TQColor menuBackgroundColor = (dynamic_cast<KStyle*>(&(kapp->tqstyle())) == NULL ? TQColor(cg.background()) : cg.background().light(103)); TQColor menuBackgroundColor = (dynamic_cast<KStyle*>(&(kapp->tqstyle())) == NULL ? TQColor(cg.background()) : cg.background().light(103));
// Enabled, Not hovering // Enabled, Not hovering
TQPixmap pixmap(width, height); TQPixmap pixmap(width, height);
pixmap.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws pixmap.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws
TQPainter painter(&pixmap); TQPainter painter(&pixmap);
int style = TQStyle::Style_Enabled | TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); int style = TQStyle::Style_Enabled | TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off);
TQColor background = cg.color(TQColorGroup::Background); TQColor background = cg.color(TQColorGroup::Background);
@ -868,7 +868,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg)
// Enabled, Hovering // Enabled, Hovering
TQPixmap pixmapHover(width, height); TQPixmap pixmapHover(width, height);
pixmapHover.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws pixmapHover.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws
painter.begin(&pixmapHover); painter.begin(&pixmapHover);
style |= TQStyle::Style_MouseOver; style |= TQStyle::Style_MouseOver;
cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor());
@ -877,7 +877,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg)
// Disabled // Disabled
TQPixmap pixmapDisabled(width, height); TQPixmap pixmapDisabled(width, height);
pixmapDisabled.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws pixmapDisabled.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws
painter.begin(&pixmapDisabled); painter.begin(&pixmapDisabled);
style = /*TQStyle::Style_Enabled | */TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); style = /*TQStyle::Style_Enabled | */TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off);
cg.setColor(TQColorGroup::Background, background); cg.setColor(TQColorGroup::Background, background);
@ -892,8 +892,8 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg)
TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg)
{ {
int width = kapp->tqstyle().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); int width = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0);
int height = kapp->tqstyle().pixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); int height = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0);
TQRect rect(0, 0, width, height); TQRect rect(0, 0, width, height);
int style = TQStyle::Style_Default | TQStyle::Style_Enabled | (checked ? TQStyle::Style_On : TQStyle::Style_Off); 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); TQRadioButton rb(0);
rb.setChecked(checked); rb.setChecked(checked);
kapp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); kapp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style);
painter.end(); painter.end();
/* Some styles like Plastik (and derived ones) have TQStyle::PE_ExclusiveIndicator drawing a radiobutton disc, as wanted, /* 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. * 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); //kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style);
style |= TQStyle::Style_MouseOver; style |= TQStyle::Style_MouseOver;
cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor());
kapp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); kapp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style);
painter.end(); painter.end();
pixmapHover.setMask(pixmapHover.createHeuristicMask()); pixmapHover.setMask(pixmapHover.createHeuristicMask());

@ -166,7 +166,7 @@ class IndentedMenuItem : public TQCustomMenuItem
IndentedMenuItem(const TQString &text, const TQString &icon = "", const TQString &shortcut = ""); IndentedMenuItem(const TQString &text, const TQString &icon = "", const TQString &shortcut = "");
~IndentedMenuItem(); ~IndentedMenuItem();
void paint(TQPainter *painter, const TQColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h); void paint(TQPainter *painter, const TQColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h);
TQSize sizeHint(); TQSize tqsizeHint();
bool fullSpan() { return true; } bool fullSpan() { return true; }
private: private:
TQString m_text; TQString m_text;
@ -183,7 +183,7 @@ class StateMenuItem : public TQCustomMenuItem
StateMenuItem(State *state, const TQString &shortcut, bool withTagName = false); StateMenuItem(State *state, const TQString &shortcut, bool withTagName = false);
~StateMenuItem(); ~StateMenuItem();
void paint(TQPainter *painter, const TQColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h); void paint(TQPainter *painter, const TQColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h);
TQSize sizeHint(); TQSize tqsizeHint();
bool fullSpan() { return true; } bool fullSpan() { return true; }
private: private:
State *m_state; State *m_state;

@ -22,7 +22,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqlineedit.h> #include <tqlineedit.h>
#include <kfontcombo.h> #include <kfontcombo.h>
#include <layout.h> #include <tqlayout.h>
#include <kkeybutton.h> #include <kkeybutton.h>
#include <kicondialog.h> #include <kicondialog.h>
#include <kiconloader.h> #include <kiconloader.h>
@ -204,7 +204,7 @@ void TagListViewItem::setup()
State *state = (m_tagCopy ? m_tagCopy->stateCopies[0]->newState : m_stateCopy->newState); State *state = (m_tagCopy ? m_tagCopy->stateCopies[0]->newState : m_stateCopy->newState);
if (m_tagCopy && !m_tagCopy->newTag->shortcut().isNull()) if (m_tagCopy && !m_tagCopy->newTag->shortcut().isNull())
text = i18n("Tag name (shortcut)", "%1 (%2)").arg(text, m_tagCopy->newTag->shortcut().toString()); text = i18n("Tag name (shortcut)", "%1 (%2)").tqarg(text, m_tagCopy->newTag->shortcut().toString());
TQFont font = state->font(listView()->font()); 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; int height = TAG_MARGIN + TQMAX(TAG_ICON_SIZE, textRect.height()) + TAG_MARGIN;
setHeight(height); setHeight(height);
repaint(); tqrepaint();
} }
void TagListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*colorGroup*/, int /*column*/, int width, int /*align*/) void TagListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*tqcolorGroup*/, int /*column*/, int width, int /*align*/)
{ {
bool withIcon = m_stateCopy || (m_tagCopy && !m_tagCopy->isMultiState()); bool withIcon = m_stateCopy || (m_tagCopy && !m_tagCopy->isMultiState());
TQString text = (m_tagCopy ? m_tagCopy->newTag->name() : m_stateCopy->newState->name()); TQString text = (m_tagCopy ? m_tagCopy->newTag->name() : m_stateCopy->newState->name());
State *state = (m_tagCopy ? m_tagCopy->stateCopies[0]->newState : m_stateCopy->newState); State *state = (m_tagCopy ? m_tagCopy->stateCopies[0]->newState : m_stateCopy->newState);
if (m_tagCopy && !m_tagCopy->newTag->shortcut().isNull()) if (m_tagCopy && !m_tagCopy->newTag->shortcut().isNull())
text = i18n("Tag name (shortcut)", "%1 (%2)").arg(text, m_tagCopy->newTag->shortcut().toString()); text = i18n("Tag name (shortcut)", "%1 (%2)").tqarg(text, m_tagCopy->newTag->shortcut().toString());
TQFont font = (withIcon ? state->font(listView()->font()) : listView()->font()); 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), KDialogBase::Ok, parent, /*name=*/"CustomizeTags", /*modal=*/true, /*separator=*/true),
m_loading(false) m_loading(false)
{ {
TQHBoxLayout *layout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint()); TQHBoxLayout *tqlayout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint());
/* Left part: */ /* Left part: */
@ -366,7 +366,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew
leftLayout->addWidget(m_tags); leftLayout->addWidget(m_tags);
leftLayout->addLayout(topLeftLayout); leftLayout->addLayout(topLeftLayout);
layout->addLayout(leftLayout); tqlayout->addLayout(leftLayout);
/* Right part: */ /* 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! 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: // Make the icon button and the remove button the same height:
int height = TQMAX(m_emblem->sizeHint().width(), m_emblem->sizeHint().height()); int height = TQMAX(m_emblem->tqsizeHint().width(), m_emblem->tqsizeHint().height());
height = TQMAX(height, m_removeEmblem->sizeHint().height()); height = TQMAX(height, m_removeEmblem->tqsizeHint().height());
m_emblem->setFixedSize(height, height); // Make it square m_emblem->setFixedSize(height, height); // Make it square
m_removeEmblem->setFixedHeight(height); m_removeEmblem->setFixedHeight(height);
m_emblem->resetIcon(); m_emblem->resetIcon();
@ -432,7 +432,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew
TQIconSet boldIconSet = kapp->iconLoader()->loadIconSet("text_bold", KIcon::Small); TQIconSet boldIconSet = kapp->iconLoader()->loadIconSet("text_bold", KIcon::Small);
m_bold = new TQPushButton(boldIconSet, "", stateWidget); m_bold = new TQPushButton(boldIconSet, "", stateWidget);
m_bold->setToggleButton(true); m_bold->setToggleButton(true);
int size = TQMAX(m_bold->sizeHint().width(), m_bold->sizeHint().height()); int size = TQMAX(m_bold->tqsizeHint().width(), m_bold->tqsizeHint().height());
m_bold->setFixedSize(size, size); // Make it square! m_bold->setFixedSize(size, size); // Make it square!
TQToolTip::add(m_bold, i18n("Bold")); TQToolTip::add(m_bold, i18n("Bold"));
@ -540,18 +540,18 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew
rightLayout->addWidget(m_stateBox); rightLayout->addWidget(m_stateBox);
rightLayout->addStretch(); rightLayout->addStretch();
layout->addWidget(rightWidget); tqlayout->addWidget(rightWidget);
rightWidget->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Expanding); rightWidget->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Expanding);
// Equalize the width of the first column of the two grids: // Equalize the width of the first column of the two grids:
int maxWidth = tagNameLabel->sizeHint().width(); int maxWidth = tagNameLabel->tqsizeHint().width();
maxWidth = TQMAX(maxWidth, shortcutLabel->sizeHint().width()); maxWidth = TQMAX(maxWidth, shortcutLabel->tqsizeHint().width());
maxWidth = TQMAX(maxWidth, m_stateNameLabel->sizeHint().width()); maxWidth = TQMAX(maxWidth, m_stateNameLabel->tqsizeHint().width());
maxWidth = TQMAX(maxWidth, emblemLabel->sizeHint().width()); maxWidth = TQMAX(maxWidth, emblemLabel->tqsizeHint().width());
maxWidth = TQMAX(maxWidth, textLabel->sizeHint().width()); maxWidth = TQMAX(maxWidth, textLabel->tqsizeHint().width());
maxWidth = TQMAX(maxWidth, fontLabel->sizeHint().width()); maxWidth = TQMAX(maxWidth, fontLabel->tqsizeHint().width());
maxWidth = TQMAX(maxWidth, backgroundColorLabel->sizeHint().width()); maxWidth = TQMAX(maxWidth, backgroundColorLabel->tqsizeHint().width());
maxWidth = TQMAX(maxWidth, textEquivalentLabel->sizeHint().width()); maxWidth = TQMAX(maxWidth, textEquivalentLabel->tqsizeHint().width());
tagNameLabel->setFixedWidth(maxWidth); tagNameLabel->setFixedWidth(maxWidth);
m_stateNameLabel->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()) ); connect( rename, TQT_SIGNAL(activated()), this, TQT_SLOT(renameIt()) );
m_tags->setMinimumSize( m_tags->setMinimumSize(
m_tags->sizeHint().width() * 2, m_tags->tqsizeHint().width() * 2,
m_tagBox->sizeHint().height() + m_stateBox->sizeHint().height() m_tagBox->tqsizeHint().height() + m_stateBox->tqsizeHint().height()
); );
if (addNewTag) if (addNewTag)
@ -681,7 +681,7 @@ TagsEditDialog::~TagsEditDialog()
void TagsEditDialog::resetTreeSizeHint() void TagsEditDialog::resetTreeSizeHint()
{ {
m_tags->setMinimumSize(m_tags->sizeHint()); m_tags->setMinimumSize(m_tags->tqsizeHint());
} }
TagListViewItem* TagsEditDialog::itemForState(State *state) TagListViewItem* TagsEditDialog::itemForState(State *state)

@ -87,7 +87,7 @@ class TagListViewItem : public TQListViewItem
TagListViewItem* parent() const; // Reimplemented to cast the return value TagListViewItem* parent() const; // Reimplemented to cast the return value
int width(const TQFontMetrics &fontMetrics, const TQListView *listView, int column) const; int width(const TQFontMetrics &fontMetrics, const TQListView *listView, int column) const;
void setup(); void setup();
void paintCell(TQPainter *painter, const TQColorGroup &colorGroup, int column, int width, int align); void paintCell(TQPainter *painter, const TQColorGroup &tqcolorGroup, int column, int width, int align);
private: private:
TagCopy *m_tagCopy; TagCopy *m_tagCopy;

@ -22,7 +22,7 @@
#include <tqstring.h> #include <tqstring.h>
#include <tqpixmap.h> #include <tqpixmap.h>
#include <tqimage.h> #include <tqimage.h>
#include <stylesheet.h> #include <tqstylesheet.h>
#include <tqregexp.h> #include <tqregexp.h>
#include <tqvaluestack.h> #include <tqvaluestack.h>
#include <tqfileinfo.h> #include <tqfileinfo.h>
@ -427,7 +427,7 @@ TQString Tools::fileNameForNewFile(const TQString &wantedName, const TQString &d
bool Tools::isAFileCut(TQMimeSource *source) bool Tools::isAFileCut(TQMimeSource *source)
{ {
if (source->provides("application/x-kde-cutselection")) { if (source->provides("application/x-kde-cutselection")) {
TQByteArray array = source->encodedData("application/x-kde-cutselection"); TQByteArray array = source->tqencodedData("application/x-kde-cutselection");
return !array.isEmpty() && TQCString(array.data(), array.size() + 1).at(0) == '1'; return !array.isEmpty() && TQCString(array.data(), array.size() + 1).at(0) == '1';
} else } else
return false; return false;

@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
#include <layout.h> #include <tqlayout.h>
#include <tqlineedit.h> #include <tqlineedit.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqsizegrip.h> #include <tqsizegrip.h>
@ -42,14 +42,14 @@ RunCommandRequester::RunCommandRequester(const TQString &runCommand, const TQStr
{ {
m_message = message; m_message = message;
TQHBoxLayout *layout = new TQHBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint()); TQHBoxLayout *tqlayout = new TQHBoxLayout(this, /*margin=*/0, KDialogBase::spacingHint());
m_runCommand = new TQLineEdit(runCommand, this); m_runCommand = new TQLineEdit(runCommand, this);
TQPushButton *pb = new TQPushButton(/*"C&hoose..."*/i18n("..."), this); TQPushButton *pb = new TQPushButton(/*"C&hoose..."*/i18n("..."), this);
pb->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); pb->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
layout->addWidget(m_runCommand); tqlayout->addWidget(m_runCommand);
layout->addWidget(pb); tqlayout->addWidget(pb);
connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelCommand()) ); 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" "Resize the window to select the image size\n"
"and close it or press Escape to accept changes."), this); "and close it or press Escape to accept changes."), this);
label->move(8, 8); label->move(8, 8);
label->setFixedSize( label->sizeHint() ); label->setFixedSize( label->tqsizeHint() );
// setSizeGripEnabled(true) doesn't work (the grip stay at the same place), so we emulate it: // setSizeGripEnabled(true) doesn't work (the grip stay at the same place), so we emulate it:
m_sizeGrip = new TQSizeGrip(this); m_sizeGrip = new TQSizeGrip(this);
m_sizeGrip->setFixedSize( m_sizeGrip->sizeHint() ); m_sizeGrip->setFixedSize( m_sizeGrip->tqsizeHint() );
setGeometry(x(), y(), w, h); setGeometry(x(), y(), w, h);
} }
@ -144,7 +144,7 @@ ViewSizeDialog::~ViewSizeDialog()
void ViewSizeDialog::resizeEvent(TQResizeEvent *) void ViewSizeDialog::resizeEvent(TQResizeEvent *)
{ {
setCaption( i18n("%1 by %2 pixels").arg(TQString::number(width())).arg(TQString::number(height())) ); setCaption( i18n("%1 by %2 pixels").tqarg(TQString::number(width())).tqarg(TQString::number(height())) );
m_sizeGrip->move( width() - m_sizeGrip->width(), height() - m_sizeGrip->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)")); insertItem(i18n("(Default)"));
TQFontDatabase fontDB; TQFontDatabase fontDB;
TQValueList<int> sizes = fontDB.standardSizes(); TQValueList<int> sizes = fontDB.tqstandardSizes();
for (TQValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it) for (TQValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it)
insertItem(TQString::number(*it)); insertItem(TQString::number(*it));

Loading…
Cancel
Save