summaryrefslogtreecommitdiffstats
path: root/kdeui/tests/kcompletiontest.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdeui/tests/kcompletiontest.cpp
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/tests/kcompletiontest.cpp')
-rw-r--r--kdeui/tests/kcompletiontest.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kdeui/tests/kcompletiontest.cpp b/kdeui/tests/kcompletiontest.cpp
index e04fdfc22..a0eba1bfd 100644
--- a/kdeui/tests/kcompletiontest.cpp
+++ b/kdeui/tests/kcompletiontest.cpp
@@ -9,14 +9,14 @@
****************************************************************************/
#include "kcompletiontest.h"
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <klineedit.h>
@@ -25,23 +25,23 @@
* Constructs a Form1 which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-Form1::Form1( QWidget* parent, const char* name )
- : QWidget( parent, name, WDestructiveClose )
+Form1::Form1( TQWidget* parent, const char* name )
+ : TQWidget( parent, name, WDestructiveClose )
{
if ( !name )
setName( "Form1" );
resize( 559, 465 );
setCaption( "Form1" );
- Form1Layout = new QVBoxLayout( this );
+ Form1Layout = new TQVBoxLayout( this );
Form1Layout->setSpacing( 6 );
Form1Layout->setMargin( 11 );
- GroupBox1 = new QGroupBox( this, "GroupBox1" );
+ GroupBox1 = new TQGroupBox( this, "GroupBox1" );
GroupBox1->setTitle( "Completion Test" );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 0 );
GroupBox1->layout()->setMargin( 0 );
- GroupBox1Layout = new QVBoxLayout( GroupBox1->layout() );
+ GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
GroupBox1Layout->setSpacing( 6 );
GroupBox1Layout->setMargin( 11 );
@@ -54,7 +54,7 @@ Form1::Form1( QWidget* parent, const char* name )
Layout1->setSpacing( 6 );
Layout1->setMargin( 0 );
- TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
+ TextLabel1 = new TQLabel( GroupBox1, "TextLabel1" );
TextLabel1->setText( "Completion" );
Layout1->addWidget( TextLabel1 );
@@ -64,7 +64,7 @@ Form1::Form1( QWidget* parent, const char* name )
edit->completionObject()->setItems( defaultItems() );
edit->completionObject()->setIgnoreCase( true );
edit->setFocus();
- QToolTip::add( edit, "right-click to change completion mode" );
+ TQToolTip::add( edit, "right-click to change completion mode" );
Layout2 = new QHBoxLayout;
Layout2->setSpacing( 6 );
@@ -74,29 +74,29 @@ Form1::Form1( QWidget* parent, const char* name )
combo->setCompletionObject( edit->completionObject() );
// combo->setMaxCount( 5 );
combo->setHistoryItems( defaultItems(), true );
- connect( combo, SIGNAL( activated( const QString& )),
- combo, SLOT( addToHistory( const QString& )));
- QToolTip::add( combo, "KHistoryCombo" );
+ connect( combo, TQT_SIGNAL( activated( const TQString& )),
+ combo, TQT_SLOT( addToHistory( const TQString& )));
+ TQToolTip::add( combo, "KHistoryCombo" );
Layout2->addWidget( combo );
LineEdit1 = new KLineEdit( GroupBox1, "LineEdit1" );
Layout2->addWidget( LineEdit1 );
- PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
+ PushButton1 = new TQPushButton( GroupBox1, "PushButton1" );
PushButton1->setText( "Add" );
- connect( PushButton1, SIGNAL( clicked() ), SLOT( slotAdd() ));
+ connect( PushButton1, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ));
Layout2->addWidget( PushButton1 );
Layout9->addLayout( Layout2 );
Layout3 = new QHBoxLayout;
Layout3->setSpacing( 6 );
Layout3->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout3->addItem( spacer );
- PushButton1_4 = new QPushButton( GroupBox1, "PushButton1_4" );
+ PushButton1_4 = new TQPushButton( GroupBox1, "PushButton1_4" );
PushButton1_4->setText( "Remove" );
- connect( PushButton1_4, SIGNAL( clicked() ), SLOT( slotRemove() ));
+ connect( PushButton1_4, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() ));
Layout3->addWidget( PushButton1_4 );
Layout9->addLayout( Layout3 );
@@ -104,25 +104,25 @@ Form1::Form1( QWidget* parent, const char* name )
Layout8->setSpacing( 6 );
Layout8->setMargin( 0 );
- ListBox1 = new QListBox( GroupBox1, "ListBox1" );
+ ListBox1 = new TQListBox( GroupBox1, "ListBox1" );
Layout8->addWidget( ListBox1 );
- connect( ListBox1, SIGNAL( highlighted( const QString& )),
- SLOT( slotHighlighted( const QString& )));
- QToolTip::add( ListBox1, "Contains the contents of the completion object.\n:x is the weighting, i.e. how often an item has been inserted");
+ connect( ListBox1, TQT_SIGNAL( highlighted( const TQString& )),
+ TQT_SLOT( slotHighlighted( const TQString& )));
+ TQToolTip::add( ListBox1, "Contains the contents of the completion object.\n:x is the weighting, i.e. how often an item has been inserted");
Layout7 = new QVBoxLayout;
Layout7->setSpacing( 6 );
Layout7->setMargin( 0 );
- PushButton1_3 = new QPushButton( GroupBox1, "PushButton1_3" );
+ PushButton1_3 = new TQPushButton( GroupBox1, "PushButton1_3" );
PushButton1_3->setText( "Completion items" );
- connect( PushButton1_3, SIGNAL( clicked() ), SLOT( slotList() ));
+ connect( PushButton1_3, TQT_SIGNAL( clicked() ), TQT_SLOT( slotList() ));
Layout7->addWidget( PushButton1_3 );
- PushButton1_2 = new QPushButton( GroupBox1, "PushButton1_2" );
+ PushButton1_2 = new TQPushButton( GroupBox1, "PushButton1_2" );
PushButton1_2->setText( "Clear" );
- connect( PushButton1_2, SIGNAL( clicked() ),
- edit->completionObject(), SLOT( clear() ));
+ connect( PushButton1_2, TQT_SIGNAL( clicked() ),
+ edit->completionObject(), TQT_SLOT( clear() ));
Layout7->addWidget( PushButton1_2 );
Layout8->addLayout( Layout7 );
Layout9->addLayout( Layout8 );
@@ -145,8 +145,8 @@ void Form1::slotAdd()
qDebug("** adding: %s", LineEdit1->text().latin1() );
edit->completionObject()->addItem( LineEdit1->text() );
- QStringList matches = edit->completionObject()->allMatches("S");
- QStringList::ConstIterator it = matches.begin();
+ TQStringList matches = edit->completionObject()->allMatches("S");
+ TQStringList::ConstIterator it = matches.begin();
for ( ; it != matches.end(); ++it )
qDebug("-- %s", (*it).latin1());
}
@@ -159,11 +159,11 @@ void Form1::slotRemove()
void Form1::slotList()
{
ListBox1->clear();
- QStringList items = edit->completionObject()->items();
+ TQStringList items = edit->completionObject()->items();
ListBox1->insertStringList( items );
}
-void Form1::slotHighlighted( const QString& text )
+void Form1::slotHighlighted( const TQString& text )
{
// remove any "weighting"
int index = text.findRev( ':' );
@@ -174,9 +174,9 @@ void Form1::slotHighlighted( const QString& text )
}
-QStringList Form1::defaultItems() const
+TQStringList Form1::defaultItems() const
{
- QStringList items;
+ TQStringList items;
items << "Super" << "Sushi" << "Samson" << "Sucks" << "Sumo" << "Schumi";
items << "Slashdot" << "sUpEr" << "SUshi" << "sUshi" << "sUShi";
items << "sushI" << "SushI";