summaryrefslogtreecommitdiffstats
path: root/python/pyqt/pyuic2/widgetdatabase.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
commit479f5f799523bffbcc83dff581a2299c047c6fff (patch)
tree186aae707ed02aac6c7cab2fb14e97f72aca5e36 /python/pyqt/pyuic2/widgetdatabase.cpp
parentf1dbff6145c98324ff82e34448b7483727e8ace4 (diff)
downloadtdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.tar.gz
tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'python/pyqt/pyuic2/widgetdatabase.cpp')
-rw-r--r--python/pyqt/pyuic2/widgetdatabase.cpp130
1 files changed, 65 insertions, 65 deletions
diff --git a/python/pyqt/pyuic2/widgetdatabase.cpp b/python/pyqt/pyuic2/widgetdatabase.cpp
index 0733fcef..ced269f3 100644
--- a/python/pyqt/pyuic2/widgetdatabase.cpp
+++ b/python/pyqt/pyuic2/widgetdatabase.cpp
@@ -18,7 +18,7 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "widgetdatabase.h"
@@ -30,22 +30,22 @@
//#include "../integration/kdevelop/kdewidgets.h"
#include <globaldefs.h>
-#include <qstrlist.h>
-#include <qdict.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqstrlist.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
-#include <qmodules.h>
+#include <tqmodules.h>
const int dbsize = 300;
const int dbcustom = 200;
const int dbdictsize = 211;
static WidgetDatabaseRecord* db[ dbsize ];
-static QDict<int> *className2Id = 0;
+static TQDict<int> *className2Id = 0;
static int dbcount = 0;
static int dbcustomcount = 200;
-static QStrList *wGroups;
-static QStrList *invisibleGroups;
+static TQStrList *wGroups;
+static TQStrList *invisibleGroups;
static bool whatsThisLoaded = FALSE;
@@ -99,14 +99,14 @@ void WidgetDatabase::setupDataBase()
invisibleGroups = new QStrList;
invisibleGroups->append( "Forms" );
invisibleGroups->append( "Temp" );
- className2Id = new QDict<int>( dbdictsize );
+ className2Id = new TQDict<int>( dbdictsize );
className2Id->setAutoDelete( TRUE );
WidgetDatabaseRecord *r = 0;
r = new WidgetDatabaseRecord;
r->iconSet = "pushbutton.xpm";
- r->name = "QPushButton";
+ r->name = "TQPushButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Push Button";
@@ -114,7 +114,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "toolbutton.xpm";
- r->name = "QToolButton";
+ r->name = "TQToolButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Tool Button";
@@ -122,7 +122,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "radiobutton.xpm";
- r->name = "QRadioButton";
+ r->name = "TQRadioButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Radio Button";
@@ -130,7 +130,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "checkbox.xpm";
- r->name = "QCheckBox";
+ r->name = "TQCheckBox";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Check Box";
@@ -140,7 +140,7 @@ void WidgetDatabase::setupDataBase()
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "groupbox.xpm";
- r->name = "QGroupBox";
+ r->name = "TQGroupBox";
r->group = widgetGroup( "Containers" );
r->toolTip = "Group Box";
r->isContainer = TRUE;
@@ -149,7 +149,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "buttongroup.xpm";
- r->name = "QButtonGroup";
+ r->name = "TQButtonGroup";
r->group = widgetGroup( "Containers" );
r->toolTip = "Button Group";
r->isContainer = TRUE;
@@ -158,7 +158,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "frame.xpm";
- r->name = "QFrame";
+ r->name = "TQFrame";
r->group = widgetGroup( "Containers" );
r->toolTip = "Frame";
r->isContainer = TRUE;
@@ -167,7 +167,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "tabwidget.xpm";
- r->name = "QTabWidget";
+ r->name = "TQTabWidget";
r->group = widgetGroup( "Containers" );
r->toolTip = "Tabwidget";
r->isContainer = TRUE;
@@ -177,7 +177,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "listbox.xpm";
- r->name = "QListBox";
+ r->name = "TQListBox";
r->group = widgetGroup( "Views" );
r->toolTip = "List Box";
@@ -185,7 +185,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "listview.xpm";
- r->name = "QListView";
+ r->name = "TQListView";
r->group = widgetGroup( "Views" );
r->toolTip = "List View";
@@ -194,7 +194,7 @@ void WidgetDatabase::setupDataBase()
#if defined(QT_MODULE_ICONVIEW) || defined(UIC)
r = new WidgetDatabaseRecord;
r->iconSet = "iconview.xpm";
- r->name = "QIconView";
+ r->name = "TQIconView";
r->group = widgetGroup( "Views" );
r->toolTip = "Icon View";
@@ -204,7 +204,7 @@ void WidgetDatabase::setupDataBase()
#if defined(QT_MODULE_TABLE)
r = new WidgetDatabaseRecord;
r->iconSet = "table.xpm";
- r->name = "QTable";
+ r->name = "TQTable";
r->group = widgetGroup( "Views" );
r->toolTip = "Table";
@@ -214,7 +214,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "lineedit.xpm";
- r->name = "QLineEdit";
+ r->name = "TQLineEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Line Edit";
@@ -222,7 +222,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "spinbox.xpm";
- r->name = "QSpinBox";
+ r->name = "TQSpinBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Spin Box";
@@ -230,7 +230,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "multilineedit.xpm";
- r->name = "QMultiLineEdit";
+ r->name = "TQMultiLineEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Multi Line Edit";
@@ -238,7 +238,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "combobox.xpm";
- r->name = "QComboBox";
+ r->name = "TQComboBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Combo Box";
@@ -246,7 +246,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "slider.xpm";
- r->name = "QSlider";
+ r->name = "TQSlider";
r->group = widgetGroup( "Input" );
r->toolTip = "Slider";
@@ -254,7 +254,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "dial.xpm";
- r->name = "QDial";
+ r->name = "TQDial";
r->group = widgetGroup( "Input" );
r->toolTip = "Dial";
@@ -262,7 +262,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "label.xpm";
- r->name = "QLabel";
+ r->name = "TQLabel";
r->group = widgetGroup( "Temp" );
r->toolTip = "Label";
@@ -288,7 +288,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "lcdnumber.xpm";
- r->name = "QLCDNumber";
+ r->name = "TQLCDNumber";
r->group = widgetGroup( "Display" );
r->toolTip = "LCD Number";
@@ -299,14 +299,14 @@ void WidgetDatabase::setupDataBase()
r->name = "Line";
r->group = widgetGroup( "Display" );
r->toolTip = "Line";
- r->includeFile = "qframe.h";
+ r->includeFile = "tqframe.h";
r->whatsThis = "The Line widget provides horizontal and vertical lines.";
append( r );
r = new WidgetDatabaseRecord;
r->iconSet = "progress.xpm";
- r->name = "QProgressBar";
+ r->name = "TQProgressBar";
r->group = widgetGroup( "Display" );
r->toolTip = "Progress Bar";
@@ -314,7 +314,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "textview.xpm";
- r->name = "QTextView";
+ r->name = "TQTextView";
r->group = widgetGroup( "Display" );
r->toolTip = "Text View";
@@ -322,7 +322,7 @@ void WidgetDatabase::setupDataBase()
r = new WidgetDatabaseRecord;
r->iconSet = "textbrowser.xpm";
- r->name = "QTextBrowser";
+ r->name = "TQTextBrowser";
r->group = widgetGroup( "Display" );
r->toolTip = "Text Browser";
@@ -338,21 +338,21 @@ void WidgetDatabase::setupDataBase()
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QWidget";
+ r->name = "TQWidget";
r->isContainer = FALSE;
r->group = widgetGroup( "Forms" );
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QDialog";
+ r->name = "TQDialog";
r->group = widgetGroup( "Forms" );
r->isContainer = FALSE;
append( r );
r = new WidgetDatabaseRecord;
- r->name = "QWizard";
+ r->name = "TQWizard";
r->group = widgetGroup( "Forms" );
r->isContainer = TRUE;
@@ -424,32 +424,32 @@ int WidgetDatabase::startCustom()
id.
*/
-QIconSet WidgetDatabase::iconSet( int id )
+TQIconSet WidgetDatabase::iconSet( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QIconSet();
+ return TQIconSet();
#if defined(DESIGNER)
if ( !r->icon )
- r->icon = new QIconSet( PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Small ),
+ r->icon = new TQIconSet( PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Small ),
PixmapChooser::loadPixmap( r->iconSet, PixmapChooser::Large ) );
return *r->icon;
#endif
- return QIconSet();
+ return TQIconSet();
}
/*!
Returns the classname of the widget which is registered as \a id.
*/
-QString WidgetDatabase::className( int id )
+TQString WidgetDatabase::className( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->name;
}
@@ -457,12 +457,12 @@ QString WidgetDatabase::className( int id )
Returns the group to which the widget registered as \a id belongs.
*/
-QString WidgetDatabase::group( int id )
+TQString WidgetDatabase::group( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->group;
}
@@ -470,12 +470,12 @@ QString WidgetDatabase::group( int id )
id.
*/
-QString WidgetDatabase::toolTip( int id )
+TQString WidgetDatabase::toolTip( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->toolTip;
}
@@ -483,12 +483,12 @@ QString WidgetDatabase::toolTip( int id )
as \a id.
*/
-QString WidgetDatabase::whatsThis( int id )
+TQString WidgetDatabase::whatsThis( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
return r->whatsThis;
}
@@ -496,12 +496,12 @@ QString WidgetDatabase::whatsThis( int id )
Returns the include file if the widget which is registered as \a id.
*/
-QString WidgetDatabase::includeFile( int id )
+TQString WidgetDatabase::includeFile( int id )
{
setupDataBase();
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return QString::null;
+ return TQString::null;
if ( r->includeFile.isNull() )
return r->name.lower() + ".h";
return r->includeFile;
@@ -520,10 +520,10 @@ bool WidgetDatabase::isContainer( int id )
return r->isContainer;
}
-QString WidgetDatabase::createWidgetName( int id )
+TQString WidgetDatabase::createWidgetName( int id )
{
setupDataBase();
- QString n = className( id );
+ TQString n = className( id );
if ( n == "QLayoutWidget" )
n = "Layout";
if ( n[ 0 ] == 'Q' )
@@ -531,13 +531,13 @@ QString WidgetDatabase::createWidgetName( int id )
WidgetDatabaseRecord *r = at( id );
if ( !r )
return n;
- n += QString::number( ++r->nameCounter );
+ n += TQString::number( ++r->nameCounter );
return n;
}
/*! Returns the id for \a name or -1 if \a name is unknown.
*/
-int WidgetDatabase::idFromClassName( const QString &name )
+int WidgetDatabase::idFromClassName( const TQString &name )
{
setupDataBase();
if ( name.isEmpty() )
@@ -576,19 +576,19 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r )
insert( dbcount++, r );
}
-QString WidgetDatabase::widgetGroup( const QString &g )
+TQString WidgetDatabase::widgetGroup( const TQString &g )
{
if ( wGroups->find( g ) == -1 )
wGroups->append( g );
return g;
}
-QString WidgetDatabase::widgetGroup( int i )
+TQString WidgetDatabase::widgetGroup( int i )
{
setupDataBase();
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
- return QString::null;
+ return TQString::null;
}
int WidgetDatabase::numWidgetGroups()
@@ -597,7 +597,7 @@ int WidgetDatabase::numWidgetGroups()
return wGroups->count();
}
-bool WidgetDatabase::isGroupVisible( const QString &g )
+bool WidgetDatabase::isGroupVisible( const TQString &g )
{
setupDataBase();
return invisibleGroups->find( g ) == -1;
@@ -621,16 +621,16 @@ bool WidgetDatabase::isWhatsThisLoaded()
return whatsThisLoaded;
}
-void WidgetDatabase::loadWhatsThis( const QString &docPath )
+void WidgetDatabase::loadWhatsThis( const TQString &docPath )
{
- QString whatsthisFile = docPath + "/whatsthis";
- QFile f( whatsthisFile );
+ TQString whatsthisFile = docPath + "/whatsthis";
+ TQFile f( whatsthisFile );
if ( !f.open( IO_ReadOnly ) )
return;
- QTextStream ts( &f );
+ TQTextStream ts( &f );
while ( !ts.atEnd() ) {
- QString s = ts.readLine();
- QStringList l = QStringList::split( " | ", s );
+ TQString s = ts.readLine();
+ TQStringList l = TQStringList::split( " | ", s );
int id = idFromClassName( l[ 1 ] );
WidgetDatabaseRecord *r = at( id );
if ( r )