From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdeui/tests/kblendtest.cpp | 2 +- kdeui/tests/kbuttonboxtest.cpp | 36 ++++++++++++++++++------------------ kdeui/tests/kcharselecttest.cpp | 2 +- kdeui/tests/kcolortest.cpp | 6 +++--- kdeui/tests/kcomboboxtest.cpp | 10 +++++----- kdeui/tests/kcompletiontest.cpp | 10 +++++----- kdeui/tests/kdesattest.cpp | 2 +- kdeui/tests/kdialogbasetest.cpp | 8 ++++---- kdeui/tests/kdockwidgetdemo.cpp | 14 +++++++------- kdeui/tests/kdualcolortest.cpp | 14 +++++++------- kdeui/tests/keditlistboxtest.cpp | 12 ++++++------ kdeui/tests/kledtest.cpp | 6 +++--- kdeui/tests/kledtest.h | 2 +- kdeui/tests/klineedittest.cpp | 6 +++--- kdeui/tests/kmessageboxtest.cpp | 34 +++++++++++++++++----------------- kdeui/tests/kpanelmenutest.cpp | 2 +- kdeui/tests/kpopuptest.cpp | 2 +- kdeui/tests/krulertest.cpp | 24 ++++++++++++------------ kdeui/tests/krulertest.h | 2 +- kdeui/tests/ktabwidgettest.cpp | 26 +++++++++++++------------- kdeui/tests/kunbalancedgrdtest.cpp | 2 +- kdeui/tests/kwizardtest.cpp | 6 +++--- 22 files changed, 114 insertions(+), 114 deletions(-) (limited to 'kdeui/tests') diff --git a/kdeui/tests/kblendtest.cpp b/kdeui/tests/kblendtest.cpp index e2d36a575..59a57dc6a 100644 --- a/kdeui/tests/kblendtest.cpp +++ b/kdeui/tests/kblendtest.cpp @@ -11,7 +11,7 @@ KBlendWidget::KBlendWidget(TQWidget *parent, const char *name) :TQWidget(parent, name) { - bgnd = qRgb(255, 255, 255); + bgnd = tqRgb(255, 255, 255); image = TQImage("testimage.png"); diff --git a/kdeui/tests/kbuttonboxtest.cpp b/kdeui/tests/kbuttonboxtest.cpp index 1773c47f9..80b4661cc 100644 --- a/kdeui/tests/kbuttonboxtest.cpp +++ b/kdeui/tests/kbuttonboxtest.cpp @@ -37,8 +37,8 @@ int main(int argc, char **argv) { "the window!\n" "Press OK or Cancel when done" , w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); - l->setMinimumSize(l->sizeHint()); + l->tqsetAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setMinimumSize(l->tqsizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); TQPushButton *b = bbox->addButton("OK"); @@ -50,7 +50,7 @@ int main(int argc, char **argv) { bbox->addStretch(1); bbox->addButton("Help"); - bbox->layout(); + bbox->tqlayout(); tl->addWidget(bbox,0); tl->activate(); w->exec(); @@ -65,8 +65,8 @@ int main(int argc, char **argv) { TQLabel *l = new TQLabel("Another common dialog\n\n"\ "OK and Cancel are right aligned\n"\ "Try resizing the window!", w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); - l->setMinimumSize(l->sizeHint()); + l->tqsetAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setMinimumSize(l->tqsizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); bbox->addStretch(1); @@ -76,7 +76,7 @@ int main(int argc, char **argv) { w, TQT_SLOT(accept())); w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()), w, TQT_SLOT(accept())); - bbox->layout(); + bbox->tqlayout(); tl->addWidget(bbox,0); tl->activate(); w->exec(); @@ -91,8 +91,8 @@ int main(int argc, char **argv) { TQLabel *l = new TQLabel("Another common dialog\n\n"\ "OK and Cancel are middle aligned\n"\ "Try resizing the window!", w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); - l->setMinimumSize(l->sizeHint()); + l->tqsetAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setMinimumSize(l->tqsizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); bbox->addStretch(1); @@ -103,7 +103,7 @@ int main(int argc, char **argv) { w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()), w, TQT_SLOT(accept())); bbox->addStretch(1); - bbox->layout(); + bbox->tqlayout(); tl->addWidget(bbox,0); tl->activate(); w->exec(); @@ -120,8 +120,8 @@ int main(int argc, char **argv) { "the maximum width for all buttons\n" "since it will look ugly -- " "anyway, it works", w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); - l->setMinimumSize(l->sizeHint()); + l->tqsetAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setMinimumSize(l->tqsizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); bbox->addStretch(1); @@ -134,7 +134,7 @@ int main(int argc, char **argv) { bbox->addButton("Push me and I give you a banana"); bbox->addStretch(1); - bbox->layout(); + bbox->tqlayout(); tl->addWidget(bbox,0); tl->activate(); w->exec(); @@ -152,8 +152,8 @@ int main(int argc, char **argv) { "prevent this strange effect as seen\n" "the former example!" ,w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); - l->setMinimumSize(l->sizeHint()); + l->tqsetAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setMinimumSize(l->tqsizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); bbox->addStretch(1); @@ -166,7 +166,7 @@ int main(int argc, char **argv) { bbox->addButton("Push me and I give you a banana", true); bbox->addStretch(1); - bbox->layout(); + bbox->tqlayout(); tl->addWidget(bbox,0); tl->activate(); w->exec(); @@ -182,8 +182,8 @@ int main(int argc, char **argv) { "to make vertically aligned buttons\n" "too?" ,w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); - l->setMinimumSize(l->sizeHint()); + l->tqsetAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setMinimumSize(l->tqsizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w, KButtonBox::Vertical); TQPushButton *b = bbox->addButton("OK"); @@ -194,7 +194,7 @@ int main(int argc, char **argv) { w, TQT_SLOT(accept())); bbox->addStretch(1); - bbox->layout(); + bbox->tqlayout(); tl->addWidget(bbox,0); tl->activate(); w->exec(); diff --git a/kdeui/tests/kcharselecttest.cpp b/kdeui/tests/kcharselecttest.cpp index facd17bca..5880c436a 100644 --- a/kdeui/tests/kcharselecttest.cpp +++ b/kdeui/tests/kcharselecttest.cpp @@ -7,7 +7,7 @@ int main (int argc,char **argv) KApplication app( argc, argv, "kcharselecttest" ); KCharSelect selector( 0, "char selector" ); - selector.resize( selector.sizeHint() ); + selector.resize( selector.tqsizeHint() ); selector.show(); selector.setCaption( "KCharSelect Test" ); diff --git a/kdeui/tests/kcolortest.cpp b/kdeui/tests/kcolortest.cpp index d4a5c2625..46f5b42bc 100644 --- a/kdeui/tests/kcolortest.cpp +++ b/kdeui/tests/kcolortest.cpp @@ -51,9 +51,9 @@ void KColorWidget::doIntensityLoop() for (int i=0;isetSpacing (KDialog::spacingHint()); TQLabel* lbl = new TQLabel("&QCombobox:", hbox); - lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); + lbl->tqsetSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); m_qc = new TQComboBox(hbox, "QtReadOnlyCombo" ); lbl->setBuddy (m_qc); @@ -48,7 +48,7 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) hbox = new TQHBox(this); hbox->setSpacing (KDialog::spacingHint()); lbl = new TQLabel("&Read-Only Combo:", hbox); - lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); + lbl->tqsetSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); m_ro = new KComboBox(hbox, "ReadOnlyCombo" ); lbl->setBuddy (m_ro); @@ -61,7 +61,7 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) hbox = new TQHBox(this); hbox->setSpacing (KDialog::spacingHint()); lbl = new TQLabel("&Editable Combo:", hbox); - lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); + lbl->tqsetSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); m_rw = new KComboBox( true, hbox, "ReadWriteCombo" ); lbl->setBuddy (m_rw); @@ -78,7 +78,7 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) hbox = new TQHBox(this); hbox->setSpacing (KDialog::spacingHint()); lbl = new TQLabel("&History Combo:", hbox); - lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); + lbl->tqsetSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); m_hc = new KHistoryCombo( true, hbox, "HistoryCombo" ); lbl->setBuddy (m_hc); @@ -94,7 +94,7 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) hbox = new TQHBox(this); hbox->setSpacing (KDialog::spacingHint()); lbl = new TQLabel( "&Konq's Combo:", hbox); - lbl->setSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); + lbl->tqsetSizePolicy (TQSizePolicy::Maximum, TQSizePolicy::Preferred); m_konqc = new KComboBox( true, hbox, "KonqyCombo" ); lbl->setBuddy (m_konqc); diff --git a/kdeui/tests/kcompletiontest.cpp b/kdeui/tests/kcompletiontest.cpp index bdd47ab48..b38ec8095 100644 --- a/kdeui/tests/kcompletiontest.cpp +++ b/kdeui/tests/kcompletiontest.cpp @@ -39,10 +39,10 @@ Form1::Form1( TQWidget* parent, const char* name ) GroupBox1 = new TQGroupBox( this, "GroupBox1" ); GroupBox1->setTitle( "Completion Test" ); GroupBox1->setColumnLayout(0, Qt::Vertical ); - GroupBox1->layout()->setSpacing( 0 ); - GroupBox1->layout()->setMargin( 0 ); - GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() ); - GroupBox1Layout->setAlignment( Qt::AlignTop ); + GroupBox1->tqlayout()->setSpacing( 0 ); + GroupBox1->tqlayout()->setMargin( 0 ); + GroupBox1Layout = new TQVBoxLayout( GroupBox1->tqlayout() ); + GroupBox1Layout->tqsetAlignment( Qt::AlignTop ); GroupBox1Layout->setSpacing( 6 ); GroupBox1Layout->setMargin( 11 ); @@ -166,7 +166,7 @@ void Form1::slotList() void Form1::slotHighlighted( const TQString& text ) { // remove any "weighting" - int index = text.findRev( ':' ); + int index = text.tqfindRev( ':' ); if ( index > 0 ) LineEdit1->setText( text.left( index ) ); else diff --git a/kdeui/tests/kdesattest.cpp b/kdeui/tests/kdesattest.cpp index 28f7d4cf2..e75b320a7 100644 --- a/kdeui/tests/kdesattest.cpp +++ b/kdeui/tests/kdesattest.cpp @@ -23,7 +23,7 @@ KDesatWidget::KDesatWidget(TQWidget *parent, const char *name) void KDesatWidget::change(double) { desat_value = slide->value(); - repaint(false); + tqrepaint(false); } void KDesatWidget::paintEvent(TQPaintEvent */*ev*/) diff --git a/kdeui/tests/kdialogbasetest.cpp b/kdeui/tests/kdialogbasetest.cpp index 5e62115fa..8092f27ef 100644 --- a/kdeui/tests/kdialogbasetest.cpp +++ b/kdeui/tests/kdialogbasetest.cpp @@ -12,12 +12,12 @@ int main(int argc, char** argv) "

DialogBase Example



" "This example shows the usage of the DialogBase class. " "DialogBase is the KDE user interface class used to create " - "dialogs with unique layout without having to define an own dialog " + "dialogs with unique tqlayout without having to define an own dialog " "style for your application.
" "It provides three standard buttons (OK, Apply, and " "Cancel) that are needed in most dialogs. Each one may be " "hidden, enabled or disabled, and tooltips and quickhelp texts might be" - " added. And you do not need to bother about geometry management, this " + " added. And you do not need to bother about tqgeometry management, this " "is all done automatically.
" "To polish your user interface even further, you might want to add " "textures to the inner and the outer frame of the dialog (the frame is " @@ -60,11 +60,11 @@ int main(int argc, char** argv) view.setMinimumSize( 250, 300 ); dialog.setMainWidget(&view); /* After finishing the setup of your main widget, the dialog needs to be - adjusted. It is not done automatically, since the layout of the main + adjusted. It is not done automatically, since the tqlayout of the main widget may change before the dialog is shown. Additionally, setting a help chapter may cause a need for adjustment since it modifies the height of the upper frame. */ - dialog.resize(dialog.minimumSize()); + dialog.resize(dialog.tqminimumSize()); /* The dialog object is used just as any other TQDialog: */ if(dialog.exec()) { diff --git a/kdeui/tests/kdockwidgetdemo.cpp b/kdeui/tests/kdockwidgetdemo.cpp index 15b83d14e..8cec435c3 100644 --- a/kdeui/tests/kdockwidgetdemo.cpp +++ b/kdeui/tests/kdockwidgetdemo.cpp @@ -82,7 +82,7 @@ SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const :TQDialog(0L,name,true) { KConfig* config = kapp->config(); - config->setGroup( TQString::fromLatin1("SFileDialogData:") + name ); + config->setGroup( TQString::tqfromLatin1("SFileDialogData:") + name ); if ( initially.isNull() ){ initially = config->readPathEntry( "InitiallyDir", TQDir::currentDirPath() ); } @@ -242,7 +242,7 @@ void PixmapView::setPixmap( const TQPixmap &pix ) { pixmap = pix; resizeContents( pixmap.size().width(), pixmap.size().height() ); - viewport()->repaint( true ); + viewport()->tqrepaint( true ); } void PixmapView::drawContents( TQPainter *p, int, int, int, int ) @@ -280,7 +280,7 @@ void Preview::showPreview( const TQString &str ) TQTextStream ts( &f ); TQString text = ts.read(); f.close(); - if ( fi.extension().lower().contains( "htm" ) ) { + if ( fi.extension().lower().tqcontains( "htm" ) ) { TQString url = html->mimeSourceFactory()->makeAbsolute( path, html->context() ); html->setText( text, url ); raiseWidget( html ); @@ -777,13 +777,13 @@ int main(int argc, char* argv[]) { #endif #if 0 - qDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::fromLatin1("All (*)"), - TQString::fromLatin1("DockWidget Demo"), "dialog1" ) ); + qDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::tqfromLatin1("All (*)"), + TQString::tqfromLatin1("DockWidget Demo"), "dialog1" ) ); #endif #if 1 - TQStringList s = SFileDialog::getOpenFileNames( TQString::null, TQString::fromLatin1("All (*)"), - TQString::fromLatin1("DockWidget Demo"), "dialog1" ); + TQStringList s = SFileDialog::getOpenFileNames( TQString::null, TQString::tqfromLatin1("All (*)"), + TQString::tqfromLatin1("DockWidget Demo"), "dialog1" ); TQStringList::Iterator it = s.begin(); for ( ; it != s.end(); ++it ){ qDebug( "%s", (*it).local8Bit().data() ); diff --git a/kdeui/tests/kdualcolortest.cpp b/kdeui/tests/kdualcolortest.cpp index 2060a9842..031a54c80 100644 --- a/kdeui/tests/kdualcolortest.cpp +++ b/kdeui/tests/kdualcolortest.cpp @@ -10,8 +10,8 @@ KDualColorWidget::KDualColorWidget(TQWidget *parent, const char *name) { lbl = new TQLabel("Testing, testing, 1, 2, 3...", this); KDualColorButton *colorBtn = - new KDualColorButton(lbl->colorGroup().text(), - lbl->colorGroup().background(), this); + new KDualColorButton(lbl->tqcolorGroup().text(), + lbl->tqcolorGroup().background(), this); connect(colorBtn, TQT_SIGNAL(fgChanged(const TQColor &)), TQT_SLOT(slotFgChanged(const TQColor &))); connect(colorBtn, TQT_SIGNAL(bgChanged(const TQColor &)), @@ -19,11 +19,11 @@ KDualColorWidget::KDualColorWidget(TQWidget *parent, const char *name) connect(colorBtn, TQT_SIGNAL(currentChanged(KDualColorButton::DualColor)), TQT_SLOT(slotCurrentChanged(KDualColorButton::DualColor))); - TQHBoxLayout *layout = new TQHBoxLayout(this, 5); - layout->addWidget(colorBtn, 0); - layout->addWidget(lbl, 1); - layout->activate(); - resize(sizeHint()); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this, 5); + tqlayout->addWidget(colorBtn, 0); + tqlayout->addWidget(lbl, 1); + tqlayout->activate(); + resize(tqsizeHint()); } void KDualColorWidget::slotFgChanged(const TQColor &c) diff --git a/kdeui/tests/keditlistboxtest.cpp b/kdeui/tests/keditlistboxtest.cpp index 90dbb74d0..fdc90a742 100644 --- a/kdeui/tests/keditlistboxtest.cpp +++ b/kdeui/tests/keditlistboxtest.cpp @@ -7,14 +7,14 @@ int main( int argc, char **argv ) KApplication app( argc, argv, "keditlistboxtest" ); KEditListBox::CustomEditor editor( new KComboBox( true, 0L, "test" ) ); - KEditListBox *box = new KEditListBox( TQString::fromLatin1("KEditListBox"), + KEditListBox *box = new KEditListBox( TQString::tqfromLatin1("KEditListBox"), editor ); - box->insertItem( TQString::fromLatin1("Test") ); - box->insertItem( TQString::fromLatin1("for") ); - box->insertItem( TQString::fromLatin1("this") ); - box->insertItem( TQString::fromLatin1("KEditListBox") ); - box->insertItem( TQString::fromLatin1("Widget") ); + box->insertItem( TQString::tqfromLatin1("Test") ); + box->insertItem( TQString::tqfromLatin1("for") ); + box->insertItem( TQString::tqfromLatin1("this") ); + box->insertItem( TQString::tqfromLatin1("KEditListBox") ); + box->insertItem( TQString::tqfromLatin1("Widget") ); box->show(); return app.exec(); diff --git a/kdeui/tests/kledtest.cpp b/kdeui/tests/kledtest.cpp index d68f1e366..f8d031530 100644 --- a/kdeui/tests/kledtest.cpp +++ b/kdeui/tests/kledtest.cpp @@ -50,14 +50,14 @@ KLedTest::KLedTest(TQWidget* parent) } else { y=Grid; index=0; - for( int shape=0; (int)shape<2; shape=(KLed::Shape)(shape+1)) { + for( int tqshape=0; (int)tqshape<2; tqshape=(KLed::Shape)(tqshape+1)) { x=Grid; for( int look=0; (int)look<3; look=(KLed::Look)(look+1)) { for(state=KLed::Off; (int)state<2; state=(KLed::State)(state+1)) { leds[index]=new KLed(Qt::yellow, state, (KLed::Look)(look+1), - (KLed::Shape)(shape+1), this); + (KLed::Shape)(tqshape+1), this); leds[index]->setGeometry(x, y, LedWidth, LedHeight); ++index; x+=Grid+LedWidth; @@ -108,7 +108,7 @@ KLedTest::nextLook() { ledlook = static_cast(tmp); l->setLook(ledlook); //qDebug("painting look %i", ledlook); - //l->repaint(); + //l->tqrepaint(); } diff --git a/kdeui/tests/kledtest.h b/kdeui/tests/kledtest.h index 33c70fe83..7a1416090 100644 --- a/kdeui/tests/kledtest.h +++ b/kdeui/tests/kledtest.h @@ -15,7 +15,7 @@ protected: const int LedWidth; const int LedHeight; const int Grid; - KLed::Shape shape; + KLed::Shape tqshape; KLed::Look look; KLed::State state; int x, y, index; diff --git a/kdeui/tests/klineedittest.cpp b/kdeui/tests/klineedittest.cpp index 3508982fa..7b9049c06 100644 --- a/kdeui/tests/klineedittest.cpp +++ b/kdeui/tests/klineedittest.cpp @@ -19,7 +19,7 @@ KLineEditTest::KLineEditTest (TQWidget* widget, const char* name ) :TQWidget( widget, name ) { - TQVBoxLayout* layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); TQStringList list; list << "Tree" << "Suuupa" << "Stroustrup" << "Stone" << "Slick" @@ -54,8 +54,8 @@ KLineEditTest::KLineEditTest (TQWidget* widget, const char* name ) m_btnHide->setFixedSize(100,30); connect( m_btnHide, TQT_SIGNAL( clicked() ), TQT_SLOT( slotHide() ) ); - layout->addWidget( m_lineedit ); - layout->addWidget( hbox ); + tqlayout->addWidget( m_lineedit ); + tqlayout->addWidget( hbox ); setCaption( "KLineEdit Unit Test" ); } diff --git a/kdeui/tests/kmessageboxtest.cpp b/kdeui/tests/kmessageboxtest.cpp index 1b926739f..44630c178 100644 --- a/kdeui/tests/kmessageboxtest.cpp +++ b/kdeui/tests/kmessageboxtest.cpp @@ -21,22 +21,22 @@ public: ExampleWidget::ExampleWidget( TQWidget *parent, const char *name ) : TQLabel(parent, name ) { - // Make the top-level layout; a vertical box to contain all widgets - // and sub-layouts. + // Make the top-level tqlayout; a vertical box to contain all widgets + // and sub-tqlayouts. TQSize sh; setText("

Hello.

"); - sh = sizeHint(); + sh = tqsizeHint(); qWarning("SizeHint = %d x %d", sh.width(), sh.height()); setText("Hello."); - sh = sizeHint(); + sh = tqsizeHint(); qWarning("SizeHint = %d x %d", sh.width(), sh.height()); setText("

Hello
World

"); - sh = sizeHint(); + sh = tqsizeHint(); qWarning("SizeHint = %d x %d", sh.width(), sh.height()); // setText("Hello\nWorld"); - sh = sizeHint(); + sh = tqsizeHint(); qWarning("SizeHint = %d x %d", sh.width(), sh.height()); - setMinimumSize(sizeHint()); + setMinimumSize(tqsizeHint()); } @@ -79,11 +79,11 @@ case 1: i = KMessageBox::warningContinueCancel(w, "You are about to .\n" "Are you sure?", - "Print", TQString::fromLatin1("&Print"), "dontask", false); + "Print", TQString::tqfromLatin1("&Print"), "dontask", false); i = KMessageBox::warningContinueCancel(0, "You are about to .\n" "Are you sure?", - "Print", TQString::fromLatin1("&Print"), "dontask", KMessageBox::AllowLink); + "Print", TQString::tqfromLatin1("&Print"), "dontask", KMessageBox::AllowLink); i = KMessageBox::questionYesNo(0, "

Do you have a printer? thisisaverylongdkldhklghklghklashgkllasghkdlsghkldfghklsabla bla bbla bla. It also has this URL.

", TQString("Bla"), TQString("Yes"), TQString("No"), "bla", KMessageBox::AllowLink); break; @@ -96,7 +96,7 @@ case 2: case 3: i = KMessageBox::questionYesNo(0, "Does your printer support color or only black and white?", - "Printer setup", TQString::fromLatin1("&Color"), TQString::fromLatin1("&Black & White")); + "Printer setup", TQString::tqfromLatin1("&Color"), TQString::tqfromLatin1("&Black & White")); break; case 4: @@ -123,33 +123,33 @@ case 6: i = KMessageBox::warningContinueCancel(0, "You are about to print.\n" "Are you sure?", - "Print", TQString::fromLatin1("&Print")); + "Print", TQString::tqfromLatin1("&Print")); break; case 7: i = KMessageBox::warningContinueCancel(0, "You are about to .\n" "Are you sure?", - "Print", TQString::fromLatin1("&Print"), "dontask", false); + "Print", TQString::tqfromLatin1("&Print"), "dontask", false); break; case 8: i = KMessageBox::warningYesNoCancel(0, - "Your document contains unsaved changes.\n" + "Your document tqcontains unsaved changes.\n" "Do you want to save your changes?\n"); break; case 9: i = KMessageBox::warningYesNoCancel(0, - "Your document contains unsaved changes.\n" + "Your document tqcontains unsaved changes.\n" "Do you want to save your changes?\n", - TQString::fromLatin1("Close")); + TQString::tqfromLatin1("Close")); break; case 10: i = KMessageBox::warningYesNoCancel(0, - "Your document contains unsaved changes.\n" + "Your document tqcontains unsaved changes.\n" "Do you want to save or discard your changes?\n", - "Close", TQString::fromLatin1("&Save"), TQString::fromLatin1("&Discard") ); + "Close", TQString::tqfromLatin1("&Save"), TQString::tqfromLatin1("&Discard") ); break; case 11: diff --git a/kdeui/tests/kpanelmenutest.cpp b/kdeui/tests/kpanelmenutest.cpp index 6f2d8f2be..e081e467f 100644 --- a/kdeui/tests/kpanelmenutest.cpp +++ b/kdeui/tests/kpanelmenutest.cpp @@ -20,7 +20,7 @@ TestWidget::TestWidget(TQWidget *parent, const char *name) init(); setText("We added \"Client Test\" to kicker. Click the K Menu to check."); - resize(sizeHint()); + resize(tqsizeHint()); } void TestWidget::init() diff --git a/kdeui/tests/kpopuptest.cpp b/kdeui/tests/kpopuptest.cpp index 96f4b3d32..3db71106b 100644 --- a/kdeui/tests/kpopuptest.cpp +++ b/kdeui/tests/kpopuptest.cpp @@ -24,7 +24,7 @@ public: menu->insertItem("Item1"); menu->insertItem("Item2"); menu->insertSeparator(); - menu->insertItem("Quit", qApp, TQT_SLOT(quit())); + menu->insertItem("Quit", tqApp, TQT_SLOT(quit())); } }; diff --git a/kdeui/tests/krulertest.cpp b/kdeui/tests/krulertest.cpp index ad2f5630a..b221ef397 100644 --- a/kdeui/tests/krulertest.cpp +++ b/kdeui/tests/krulertest.cpp @@ -55,7 +55,7 @@ KRulerTest::KRulerTest( const char *name ) { mainframe = new TQFrame(this); - layout = new TQGridLayout(mainframe, 2, 2); + tqlayout = new TQGridLayout(mainframe, 2, 2); miniwidget = new TQFrame(mainframe); miniwidget->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised); @@ -85,10 +85,10 @@ KRulerTest::KRulerTest( const char *name ) connect( bigwidget, TQT_SIGNAL(newHeight(int)), TQT_SLOT(slotNewHeight(int)) ); - layout->addWidget(miniwidget, 0, 0); - layout->addWidget(hruler, 0, 1); - layout->addWidget(vruler, 1, 0); - layout->addWidget(bigwidget, 1, 1); + tqlayout->addWidget(miniwidget, 0, 0); + tqlayout->addWidget(hruler, 0, 1); + tqlayout->addWidget(vruler, 1, 0); + tqlayout->addWidget(bigwidget, 1, 1); mouse_message = new TQLabel("Press and hold mouse button\nfor pointer movement", bigwidget); mouse_message->adjustSize(); @@ -140,7 +140,7 @@ KRulerTest::KRulerTest( const char *name ) beginMark = new KIntNumInput(0, lineEdit); beginMark->setRange(-1000, 1000, 1, false); beginMark->move(5, 15); - beginMark->setFixedSize(beginMark->sizeHint()); + beginMark->setFixedSize(beginMark->tqsizeHint()); connect(beginMark, TQT_SIGNAL(valueChanged(int)), hruler, TQT_SLOT(slotNewOffset(int)) ); connect(beginMark, TQT_SIGNAL(valueChanged(int)), @@ -148,7 +148,7 @@ KRulerTest::KRulerTest( const char *name ) endMark = new KIntNumInput(0, lineEdit); endMark->setRange(-1000, 1000, 1, false); endMark->move(5, 35); - endMark->setFixedSize(endMark->sizeHint()); + endMark->setFixedSize(endMark->tqsizeHint()); connect(endMark, TQT_SIGNAL(valueChanged(int)), hruler, TQT_SLOT(slotEndOffset(int)) ); connect(endMark, TQT_SIGNAL(valueChanged(int)), @@ -156,7 +156,7 @@ KRulerTest::KRulerTest( const char *name ) lengthInput = new KIntNumInput(0, lineEdit); lengthInput->setRange(-1000, 1000, 1, false); lengthInput->move(5, 55); - lengthInput->setFixedSize(lengthInput->sizeHint()); + lengthInput->setFixedSize(lengthInput->tqsizeHint()); connect(lengthInput, TQT_SIGNAL(valueChanged(int)), hruler, TQT_SLOT(slotEndOffset(int)) ); connect(lengthInput, TQT_SIGNAL(valueChanged(int)), @@ -169,21 +169,21 @@ KRulerTest::KRulerTest( const char *name ) transX = new KDoubleNumInput(0.0, vertrot); transX->setRange(-1000, 1000, 1, false); transX->move(5, 15); - transX->setFixedSize(transX->sizeHint()); + transX->setFixedSize(transX->tqsizeHint()); //transX->setLabel("transx", AlignLeft); connect(transX, TQT_SIGNAL(valueChanged(double)), TQT_SLOT(slotSetXTrans(double)) ); transY = new KDoubleNumInput(-12.0, vertrot); transY->setRange(-1000, 1000, 1, false); transY->move(5, 35); - transY->setFixedSize(transY->sizeHint()); + transY->setFixedSize(transY->tqsizeHint()); //transY->setLabel("transy", AlignLeft); connect(transY, TQT_SIGNAL(valueChanged(double)), TQT_SLOT(slotSetYTrans(double)) ); rotV = new KDoubleNumInput(90.0, vertrot); rotV->setRange(-1000, 1000, 1, false); rotV->move(5, 55); - rotV->setFixedSize(rotV->sizeHint()); + rotV->setFixedSize(rotV->tqsizeHint()); //rotV->setLabel("rot", AlignLeft); connect(rotV, TQT_SIGNAL(valueChanged(double)), TQT_SLOT(slotSetRotate(double)) ); @@ -221,7 +221,7 @@ KRulerTest::KRulerTest( const char *name ) KRulerTest::~KRulerTest() { - delete layout; + delete tqlayout; delete hruler; delete vruler; delete miniwidget; diff --git a/kdeui/tests/krulertest.h b/kdeui/tests/krulertest.h index fe552467c..b21c5375f 100644 --- a/kdeui/tests/krulertest.h +++ b/kdeui/tests/krulertest.h @@ -74,7 +74,7 @@ private slots: private: KRuler *hruler, *vruler; - TQGridLayout *layout; + TQGridLayout *tqlayout; TQFrame *miniwidget, *bigwidget; TQFrame *mainframe; diff --git a/kdeui/tests/ktabwidgettest.cpp b/kdeui/tests/ktabwidgettest.cpp index 32ed5c89f..f67dd17a9 100644 --- a/kdeui/tests/ktabwidgettest.cpp +++ b/kdeui/tests/ktabwidgettest.cpp @@ -39,51 +39,51 @@ Test::Test( TQWidget* parent, const char *name ) mWidget->setTabReorderingEnabled( true ); TQWidget * grid = new TQWidget(this); - TQGridLayout * gridlayout = new TQGridLayout( grid, 5, 2 ); + TQGridLayout * gridtqlayout = new TQGridLayout( grid, 5, 2 ); TQPushButton * addTab = new TQPushButton( "Add Tab", grid ); - gridlayout->addWidget( addTab, 0, 0 ); + gridtqlayout->addWidget( addTab, 0, 0 ); connect( addTab, TQT_SIGNAL( clicked() ), TQT_SLOT( addTab() ) ); TQPushButton * removeTab = new TQPushButton( "Remove Current Tab", grid ); - gridlayout->addWidget( removeTab, 0, 1 ); + gridtqlayout->addWidget( removeTab, 0, 1 ); connect( removeTab, TQT_SIGNAL( clicked() ), TQT_SLOT( removeCurrentTab() ) ); mLeftButton = new TQCheckBox( "Show left button", grid ); - gridlayout->addWidget( mLeftButton, 1, 0 ); + gridtqlayout->addWidget( mLeftButton, 1, 0 ); connect( mLeftButton, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleLeftButton(bool) ) ); mLeftButton->setChecked(true); TQCheckBox * leftPopup = new TQCheckBox( "Enable left popup", grid ); - gridlayout->addWidget( leftPopup, 2, 0 ); + gridtqlayout->addWidget( leftPopup, 2, 0 ); connect( leftPopup, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleLeftPopup(bool) ) ); leftPopup->setChecked(true); mRightButton = new TQCheckBox( "Show right button", grid ); - gridlayout->addWidget( mRightButton, 1, 1 ); + gridtqlayout->addWidget( mRightButton, 1, 1 ); connect( mRightButton, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleRightButton(bool) ) ); mRightButton->setChecked(true); TQCheckBox * rightPopup = new TQCheckBox( "Enable right popup", grid ); - gridlayout->addWidget( rightPopup, 2, 1 ); + gridtqlayout->addWidget( rightPopup, 2, 1 ); connect( rightPopup, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleRightPopup(bool) ) ); rightPopup->setChecked(true); mTabsBottom = new TQCheckBox( "Show tabs at bottom", grid ); - gridlayout->addWidget( mTabsBottom, 3, 0 ); + gridtqlayout->addWidget( mTabsBottom, 3, 0 ); connect( mTabsBottom, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabPosition(bool) ) ); - TQCheckBox * tabshape = new TQCheckBox( "Triangular tab shape", grid ); - gridlayout->addWidget( tabshape, 3, 1 ); - connect( tabshape, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabShape(bool) ) ); + TQCheckBox * tabtqshape = new TQCheckBox( "Triangular tab tqshape", grid ); + gridtqlayout->addWidget( tabtqshape, 3, 1 ); + connect( tabtqshape, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabShape(bool) ) ); TQCheckBox *tabClose = new TQCheckBox( "Close button on icon hover", grid ); - gridlayout->addWidget( tabClose, 4, 0 ); + gridtqlayout->addWidget( tabClose, 4, 0 ); connect( tabClose, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleCloseButtons(bool) ) ); tabClose->setChecked(true); TQCheckBox * showlabels = new TQCheckBox( "Show labels", grid ); - gridlayout->addWidget( showlabels, 4, 1 ); + gridtqlayout->addWidget( showlabels, 4, 1 ); connect( showlabels, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( toggleLabels(bool) ) ); } diff --git a/kdeui/tests/kunbalancedgrdtest.cpp b/kdeui/tests/kunbalancedgrdtest.cpp index 7f5b2cc78..9f616496d 100644 --- a/kdeui/tests/kunbalancedgrdtest.cpp +++ b/kdeui/tests/kunbalancedgrdtest.cpp @@ -159,7 +159,7 @@ void myTopWidget::rebalance() if ((otime - itime )> 500) { - grds->repaint(false); + grds->tqrepaint(false); itime = time.elapsed(); } } diff --git a/kdeui/tests/kwizardtest.cpp b/kdeui/tests/kwizardtest.cpp index 91974263e..a96c9892a 100644 --- a/kdeui/tests/kwizardtest.cpp +++ b/kdeui/tests/kwizardtest.cpp @@ -36,10 +36,10 @@ int main(int argc, char **argv) TQWidget *p = new TQWidget; TQString msg = TQString("This is page %1 out of 10").arg(i); TQLabel *label = new TQLabel(msg, p); - TQHBoxLayout *layout = new TQHBoxLayout(p, 5); - label->setAlignment(Qt::AlignCenter); + TQHBoxLayout *tqlayout = new TQHBoxLayout(p, 5); + label->tqsetAlignment(Qt::AlignCenter); label->setFixedSize(300, 200); - layout->addWidget(label); + tqlayout->addWidget(label); TQString title = TQString("%1. page").arg(i); wiz->addPage(p, title); wiz->setFinishEnabled(p, (i==10)); -- cgit v1.2.1