summaryrefslogtreecommitdiffstats
path: root/lib/widgets/propeditor/qeditlistbox.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /lib/widgets/propeditor/qeditlistbox.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/widgets/propeditor/qeditlistbox.cpp')
-rw-r--r--lib/widgets/propeditor/qeditlistbox.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/lib/widgets/propeditor/qeditlistbox.cpp b/lib/widgets/propeditor/qeditlistbox.cpp
index 4de4e567..e1b09e4e 100644
--- a/lib/widgets/propeditor/qeditlistbox.cpp
+++ b/lib/widgets/propeditor/qeditlistbox.cpp
@@ -23,15 +23,15 @@
#include <klineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qstringlist.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqstringlist.h>
#include <assert.h>
@@ -46,24 +46,24 @@ public:
int buttons;
};
-QEditListBox::QEditListBox(QWidget *parent, const char *name,
+QEditListBox::QEditListBox(TQWidget *parent, const char *name,
bool checkAtEntering, int buttons )
- :QGroupBox(parent, name )
+ :TQGroupBox(parent, name )
{
init( checkAtEntering, buttons );
}
-QEditListBox::QEditListBox(const QString& title, QWidget *parent,
+QEditListBox::QEditListBox(const TQString& title, TQWidget *parent,
const char *name, bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name )
+ :TQGroupBox(title, parent, name )
{
init( checkAtEntering, buttons );
}
-QEditListBox::QEditListBox(const QString& title, const CustomEditor& custom,
- QWidget *parent, const char *name,
+QEditListBox::QEditListBox(const TQString& title, const CustomEditor& custom,
+ TQWidget *parent, const char *name,
bool checkAtEntering, int buttons)
- :QGroupBox(title, parent, name )
+ :TQGroupBox(title, parent, name )
{
m_lineEdit = custom.lineEdit();
init( checkAtEntering, buttons, custom.representationWidget() );
@@ -76,7 +76,7 @@ QEditListBox::~QEditListBox()
}
void QEditListBox::init( bool checkAtEntering, int buttons,
- QWidget *representationWidget )
+ TQWidget *representationWidget )
{
d=new QEditListBoxPrivate;
d->m_checkAtEntering=checkAtEntering;
@@ -92,11 +92,11 @@ void QEditListBox::init( bool checkAtEntering, int buttons,
servNewButton = servRemoveButton = servUpButton = servDownButton = 0L;
- setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,
- QSizePolicy::MinimumExpanding));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::MinimumExpanding));
- QWidget * gb = this;
- QGridLayout * grid = new QGridLayout(gb, 7 - lostButtons, 2,
+ TQWidget * gb = this;
+ TQGridLayout * grid = new TQGridLayout(gb, 7 - lostButtons, 2,
MarginSize,
SpazingSize);
grid->addRowSpacing(0, fontMetrics().lineSpacing());
@@ -106,56 +106,56 @@ void QEditListBox::init( bool checkAtEntering, int buttons,
grid->setMargin(15);
if ( representationWidget )
- representationWidget->reparent( gb, QPoint(0,0) );
+ representationWidget->reparent( gb, TQPoint(0,0) );
else
m_lineEdit=new KLineEdit(gb);
- m_listBox = new QListBox(gb);
+ m_listBox = new TQListBox(gb);
- QWidget *editingWidget = representationWidget ?
+ TQWidget *editingWidget = representationWidget ?
representationWidget : m_lineEdit;
grid->addMultiCellWidget(editingWidget,1,1,0,1);
grid->addMultiCellWidget(m_listBox, 2, 6 - lostButtons, 0, 0);
int row = 2;
if ( buttons & Add ) {
- servNewButton = new QPushButton(i18n("&Add"), gb);
+ servNewButton = new TQPushButton(i18n("&Add"), gb);
servNewButton->setEnabled(false);
- connect(servNewButton, SIGNAL(clicked()), SLOT(addItem()));
+ connect(servNewButton, TQT_SIGNAL(clicked()), TQT_SLOT(addItem()));
grid->addWidget(servNewButton, row++, 1);
}
if ( buttons & Remove ) {
- servRemoveButton = new QPushButton(i18n("&Remove"), gb);
+ servRemoveButton = new TQPushButton(i18n("&Remove"), gb);
servRemoveButton->setEnabled(false);
- connect(servRemoveButton, SIGNAL(clicked()), SLOT(removeItem()));
+ connect(servRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem()));
grid->addWidget(servRemoveButton, row++, 1);
}
if ( buttons & UpDown ) {
- servUpButton = new QPushButton(i18n("Move &Up"), gb);
+ servUpButton = new TQPushButton(i18n("Move &Up"), gb);
servUpButton->setEnabled(false);
- connect(servUpButton, SIGNAL(clicked()), SLOT(moveItemUp()));
+ connect(servUpButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemUp()));
- servDownButton = new QPushButton(i18n("Move &Down"), gb);
+ servDownButton = new TQPushButton(i18n("Move &Down"), gb);
servDownButton->setEnabled(false);
- connect(servDownButton, SIGNAL(clicked()), SLOT(moveItemDown()));
+ connect(servDownButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemDown()));
grid->addWidget(servUpButton, row++, 1);
grid->addWidget(servDownButton, row++, 1);
}
- connect(m_lineEdit,SIGNAL(textChanged(const QString&)),this,SLOT(typedSomething(const QString&)));
+ connect(m_lineEdit,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(typedSomething(const TQString&)));
- connect(m_lineEdit,SIGNAL(returnPressed()),this,SLOT(addItem()));
- connect(m_listBox, SIGNAL(highlighted(int)), SLOT(enableMoveButtons(int)));
+ connect(m_lineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addItem()));
+ connect(m_listBox, TQT_SIGNAL(highlighted(int)), TQT_SLOT(enableMoveButtons(int)));
// maybe supplied lineedit has some text already
typedSomething( m_lineEdit->text() );
}
-void QEditListBox::typedSomething(const QString& text)
+void QEditListBox::typedSomething(const TQString& text)
{
if(currentItem() >= 0) {
if(currentText() != m_lineEdit->text())
@@ -206,7 +206,7 @@ void QEditListBox::moveItemUp()
return;
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ TQListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex-1);
m_listBox->setCurrentItem(selIndex - 1);
@@ -229,7 +229,7 @@ void QEditListBox::moveItemDown()
return;
}
- QListBoxItem *selItem = m_listBox->item(selIndex);
+ TQListBoxItem *selItem = m_listBox->item(selIndex);
m_listBox->takeItem(selItem);
m_listBox->insertItem(selItem, selIndex+1);
m_listBox->setCurrentItem(selIndex + 1);
@@ -245,7 +245,7 @@ void QEditListBox::addItem()
if ( !servNewButton || !servNewButton->isEnabled() )
return;
- const QString& currentTextLE=m_lineEdit->text();
+ const TQString& currentTextLE=m_lineEdit->text();
bool alreadyInList(false);
//if we didn't check for dupes at the inserting we have to do it now
if (!d->m_checkAtEntering)
@@ -294,7 +294,7 @@ void QEditListBox::removeItem()
if ( selected >= 0 )
{
- QString removedText = m_listBox->currentText();
+ TQString removedText = m_listBox->currentText();
m_listBox->removeItem( selected );
if ( count() > 0 )
@@ -351,17 +351,17 @@ void QEditListBox::clear()
emit changed();
}
-void QEditListBox::insertStringList(const QStringList& list, int index)
+void QEditListBox::insertStringList(const TQStringList& list, int index)
{
m_listBox->insertStringList(list,index);
}
-void QEditListBox::insertStrList(const QStrList* list, int index)
+void QEditListBox::insertStrList(const TQStrList* list, int index)
{
m_listBox->insertStrList(list,index);
}
-void QEditListBox::insertStrList(const QStrList& list, int index)
+void QEditListBox::insertStrList(const TQStrList& list, int index)
{
m_listBox->insertStrList(list,index);
}
@@ -371,16 +371,16 @@ void QEditListBox::insertStrList(const char ** list, int numStrings, int index)
m_listBox->insertStrList(list,numStrings,index);
}
-QStringList QEditListBox::items() const
+TQStringList QEditListBox::items() const
{
- QStringList list;
+ TQStringList list;
for ( uint i = 0; i < m_listBox->count(); i++ )
list.append( m_listBox->text( i ));
return list;
}
-void QEditListBox::setItems(const QStringList& items)
+void QEditListBox::setItems(const TQStringList& items)
{
m_listBox->clear();
m_listBox->insertStringList(items, 0);
@@ -393,7 +393,7 @@ void QEditListBox::virtual_hook( int, void* )
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-QEditListBox::CustomEditor::CustomEditor( QComboBox *combo )
+QEditListBox::CustomEditor::CustomEditor( TQComboBox *combo )
{
m_representationWidget = combo;
m_lineEdit = dynamic_cast<KLineEdit*>( combo->lineEdit() );