summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/designer/rbuic/widgetdatabase.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 16:20:48 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 16:20:48 -0600
commite63beeb5bdb82987b1e00bc35178667786fbad48 (patch)
treeab77b6ac830b7944d5d1eb9ce8f81feb8fdab948 /qtruby/rubylib/designer/rbuic/widgetdatabase.cpp
parent67557a2b56c0678c22ab1b00c4fd0224c5e9ed99 (diff)
downloadtdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.tar.gz
tdebindings-e63beeb5bdb82987b1e00bc35178667786fbad48.zip
Fix incorrect conversion
Diffstat (limited to 'qtruby/rubylib/designer/rbuic/widgetdatabase.cpp')
-rw-r--r--qtruby/rubylib/designer/rbuic/widgetdatabase.cpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/qtruby/rubylib/designer/rbuic/widgetdatabase.cpp b/qtruby/rubylib/designer/rbuic/widgetdatabase.cpp
index cc4779a2..f8a0f0fd 100644
--- a/qtruby/rubylib/designer/rbuic/widgetdatabase.cpp
+++ b/qtruby/rubylib/designer/rbuic/widgetdatabase.cpp
@@ -41,17 +41,17 @@ const int dbsize = 300;
const int dbcustom = 200;
const int dbdictsize = 211;
static WidgetDatabaseRecord* db[ dbsize ];
-static TTQDict<int> *className2Id = 0;
+static TQDict<int> *className2Id = 0;
static int dbcount = 0;
static int dbcustomcount = 200;
-static TTQStrList *wGroups;
-static TTQStrList *invisibleGroups;
+static TQStrList *wGroups;
+static TQStrList *invisibleGroups;
static bool whatsThisLoaded = false;
static TQPluginManager<WidgetInterface> *widgetPluginManager = 0;
static bool plugins_set_up = false;
static bool was_in_setup = false;
-TTQCleanupHandler<TQPluginManager<WidgetInterface> > cleanup_manager;
+TQCleanupHandler<TQPluginManager<WidgetInterface> > cleanup_manager;
WidgetDatabaseRecord::WidgetDatabaseRecord()
{
@@ -117,14 +117,14 @@ void WidgetDatabase::setupDataBase( int id )
invisibleGroups = new TQStrList;
invisibleGroups->append( "Forms" );
invisibleGroups->append( "Temp" );
- className2Id = new TTQDict<int>( dbdictsize );
+ className2Id = new TQDict<int>( dbdictsize );
className2Id->setAutoDelete( true );
WidgetDatabaseRecord *r = 0;
r = new WidgetDatabaseRecord;
r->iconSet = "pushbutton.xpm";
- r->name = "TTQPushButton";
+ r->name = "TQPushButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Push Button";
@@ -132,7 +132,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "toolbutton.xpm";
- r->name = "TTQToolButton";
+ r->name = "TQToolButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Tool Button";
@@ -140,7 +140,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "radiobutton.xpm";
- r->name = "TTQRadioButton";
+ r->name = "TQRadioButton";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Radio Button";
@@ -148,7 +148,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "checkbox.xpm";
- r->name = "TTQCheckBox";
+ r->name = "TQCheckBox";
r->group = widgetGroup( "Buttons" );
r->toolTip = "Check Box";
@@ -156,7 +156,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "groupbox.xpm";
- r->name = "TTQGroupBox";
+ r->name = "TQGroupBox";
r->group = widgetGroup( "Containers" );
r->toolTip = "Group Box";
r->isContainer = true;
@@ -165,7 +165,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "buttongroup.xpm";
- r->name = "TTQButtonGroup";
+ r->name = "TQButtonGroup";
r->group = widgetGroup( "Containers" );
r->toolTip = "Button Group";
r->isContainer = true;
@@ -174,7 +174,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "frame.xpm";
- r->name = "TTQFrame";
+ r->name = "TQFrame";
r->group = widgetGroup( "Containers" );
r->toolTip = "Frame";
r->isContainer = true;
@@ -183,7 +183,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "tabwidget.xpm";
- r->name = "TTQTabWidget";
+ r->name = "TQTabWidget";
r->group = widgetGroup( "Containers" );
r->toolTip = "Tabwidget";
r->isContainer = true;
@@ -193,7 +193,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "listbox.xpm";
- r->name = "TTQListBox";
+ r->name = "TQListBox";
r->group = widgetGroup( "Views" );
r->toolTip = "List Box";
@@ -201,7 +201,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "listview.xpm";
- r->name = "TTQListView";
+ r->name = "TQListView";
r->group = widgetGroup( "Views" );
r->toolTip = "List View";
@@ -210,7 +210,7 @@ void WidgetDatabase::setupDataBase( int id )
#if !defined(QT_NO_ICONVIEW) || defined(UIC)
r = new WidgetDatabaseRecord;
r->iconSet = "iconview.xpm";
- r->name = "TTQIconView";
+ r->name = "TQIconView";
r->group = widgetGroup( "Views" );
r->toolTip = "Icon View";
@@ -220,7 +220,7 @@ void WidgetDatabase::setupDataBase( int id )
#if !defined(QT_NO_TABLE)
r = new WidgetDatabaseRecord;
r->iconSet = "table.xpm";
- r->name = "TTQTable";
+ r->name = "TQTable";
r->group = widgetGroup( "Views" );
r->toolTip = "Table";
@@ -231,7 +231,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "datatable.xpm";
r->includeFile = "tqdatatable.h";
- r->name = "TTQDataTable";
+ r->name = "TQDataTable";
r->group = widgetGroup( "Database" );
r->toolTip = "Data Table";
@@ -240,7 +240,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "lineedit.xpm";
- r->name = "TTQLineEdit";
+ r->name = "TQLineEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Line Edit";
@@ -248,7 +248,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "spinbox.xpm";
- r->name = "TTQSpinBox";
+ r->name = "TQSpinBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Spin Box";
@@ -283,7 +283,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "multilineedit.xpm";
- r->name = "TTQMultiLineEdit";
+ r->name = "TQMultiLineEdit";
r->group = widgetGroup( "Temp" );
r->toolTip = "Multi Line Edit";
@@ -291,7 +291,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "richtextedit.xpm";
- r->name = "TTQTextEdit";
+ r->name = "TQTextEdit";
r->group = widgetGroup( "Input" );
r->toolTip = "Richtext Editor";
@@ -299,7 +299,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "combobox.xpm";
- r->name = "TTQComboBox";
+ r->name = "TQComboBox";
r->group = widgetGroup( "Input" );
r->toolTip = "Combo Box";
@@ -307,7 +307,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "slider.xpm";
- r->name = "TTQSlider";
+ r->name = "TQSlider";
r->group = widgetGroup( "Input" );
r->toolTip = "Slider";
@@ -315,7 +315,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "scrollbar.xpm";
- r->name = "TTQScrollBar";
+ r->name = "TQScrollBar";
r->group = widgetGroup( "Input" );
r->toolTip = "Scrollbar";
@@ -323,7 +323,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "dial.xpm";
- r->name = "TTQDial";
+ r->name = "TQDial";
r->group = widgetGroup( "Input" );
r->toolTip = "Dial";
@@ -331,7 +331,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "label.xpm";
- r->name = "TTQLabel";
+ r->name = "TQLabel";
r->group = widgetGroup( "Temp" );
r->toolTip = "Label";
@@ -375,7 +375,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "progress.xpm";
- r->name = "TTQProgressBar";
+ r->name = "TQProgressBar";
r->group = widgetGroup( "Display" );
r->toolTip = "Progress Bar";
@@ -383,7 +383,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "textview.xpm";
- r->name = "TTQTextView";
+ r->name = "TQTextView";
r->group = widgetGroup( "Temp" );
r->toolTip = "Text View";
@@ -391,7 +391,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "textbrowser.xpm";
- r->name = "TTQTextBrowser";
+ r->name = "TQTextBrowser";
r->group = widgetGroup( "Display" );
r->toolTip = "Text Browser";
@@ -407,21 +407,21 @@ void WidgetDatabase::setupDataBase( int id )
append( r );
r = new WidgetDatabaseRecord;
- r->name = "TTQWidget";
+ r->name = "TQWidget";
r->isForm = true;
r->group = widgetGroup( "Forms" );
append( r );
r = new WidgetDatabaseRecord;
- r->name = "TTQDialog";
+ r->name = "TQDialog";
r->group = widgetGroup( "Forms" );
r->isForm = true;
append( r );
r = new WidgetDatabaseRecord;
- r->name = "TTQWizard";
+ r->name = "TQWizard";
r->group = widgetGroup( "Forms" );
r->isContainer = true;
@@ -443,7 +443,7 @@ void WidgetDatabase::setupDataBase( int id )
append( r );
r = new WidgetDatabaseRecord;
- r->name = "TTQSplitter";
+ r->name = "TQSplitter";
r->group = widgetGroup( "Temp" );
r->includeFile = "tqsplitter.h";
r->isContainer = true;
@@ -476,7 +476,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "";
- r->name = "TTQMainWindow";
+ r->name = "TQMainWindow";
r->includeFile = "tqmainwindow.h";
r->group = widgetGroup( "Temp" );
r->isContainer = true;
@@ -486,7 +486,7 @@ void WidgetDatabase::setupDataBase( int id )
#ifndef QT_NO_SQL
r = new WidgetDatabaseRecord;
r->iconSet = "";
- r->name = "TTQDataBrowser";
+ r->name = "TQDataBrowser";
r->includeFile = "tqdatabrowser.h";
r->group = widgetGroup( "Database" );
r->toolTip = "Data Browser";
@@ -497,7 +497,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconSet = "";
- r->name = "TTQDataView";
+ r->name = "TQDataView";
r->includeFile = "tqdataview.h";
r->group = widgetGroup( "Database" );
r->toolTip = "Data View";
@@ -517,8 +517,8 @@ void WidgetDatabase::setupPlugins()
if ( plugins_set_up )
return;
plugins_set_up = true;
- TTQStringList widgets = widgetManager()->featureList();
- for ( TTQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) {
+ TQStringList widgets = widgetManager()->featureList();
+ for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) {
if ( hasWidget( *it ) )
continue;
WidgetDatabaseRecord *r = new WidgetDatabaseRecord;
@@ -528,11 +528,11 @@ void WidgetDatabase::setupPlugins()
continue;
#ifndef UIC
- TTQIconSet icon = iface->iconSet( *it );
+ TQIconSet icon = iface->iconSet( *it );
if ( !icon.pixmap().isNull() )
- r->icon = new TTQIconSet( icon );
+ r->icon = new TQIconSet( icon );
#endif
- TTQString grp = iface->group( *it );
+ TQString grp = iface->group( *it );
if ( grp.isEmpty() )
grp = "3rd party widgets";
r->group = widgetGroup( grp );
@@ -570,19 +570,19 @@ int WidgetDatabase::startCustom()
Returns the iconset which represents the class registered as \a id.
*/
-TTQIconSet WidgetDatabase::iconSet( int id )
+TQIconSet WidgetDatabase::iconSet( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TTQIconSet();
+ return TQIconSet();
#if !defined(UIC) && !defined(RESOURCE)
if ( !r->icon )
- r->icon = new TTQIconSet( 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;
#else
- return TTQIconSet();
+ return TQIconSet();
#endif
}
@@ -590,12 +590,12 @@ TTQIconSet WidgetDatabase::iconSet( int id )
Returns the classname of the widget which is registered as \a id.
*/
-TTQString WidgetDatabase::className( int id )
+TQString WidgetDatabase::className( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TTQString::null;
+ return TQString::null;
return r->name;
}
@@ -603,12 +603,12 @@ TTQString WidgetDatabase::className( int id )
Returns the group to which the widget registered as \a id belongs.
*/
-TTQString WidgetDatabase::group( int id )
+TQString WidgetDatabase::group( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TTQString::null;
+ return TQString::null;
return r->group;
}
@@ -616,12 +616,12 @@ TTQString WidgetDatabase::group( int id )
id.
*/
-TTQString WidgetDatabase::toolTip( int id )
+TQString WidgetDatabase::toolTip( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TTQString::null;
+ return TQString::null;
return r->toolTip;
}
@@ -629,12 +629,12 @@ TTQString WidgetDatabase::toolTip( int id )
as \a id.
*/
-TTQString WidgetDatabase::whatsThis( int id )
+TQString WidgetDatabase::whatsThis( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TTQString::null;
+ return TQString::null;
return r->whatsThis;
}
@@ -642,12 +642,12 @@ TTQString WidgetDatabase::whatsThis( int id )
Returns the include file if the widget which is registered as \a id.
*/
-TTQString WidgetDatabase::includeFile( int id )
+TQString WidgetDatabase::includeFile( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TTQString::null;
+ return TQString::null;
if ( r->includeFile.isNull() )
return r->name.lower() + ".h";
return r->includeFile;
@@ -677,10 +677,10 @@ bool WidgetDatabase::isContainer( int id )
return r->isContainer || r->isForm;
}
-TTQString WidgetDatabase::createWidgetName( int id )
+TQString WidgetDatabase::createWidgetName( int id )
{
setupDataBase( id );
- TTQString n = className( id );
+ TQString n = className( id );
if ( n == "TQLayoutWidget" )
n = "Layout";
if ( n[ 0 ] == 'Q' )
@@ -688,13 +688,13 @@ TTQString WidgetDatabase::createWidgetName( int id )
WidgetDatabaseRecord *r = at( id );
if ( !r )
return n;
- n += TTQString::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 TTQString &name )
+int WidgetDatabase::idFromClassName( const TQString &name )
{
setupDataBase( -1 );
if ( name.isEmpty() )
@@ -715,7 +715,7 @@ int WidgetDatabase::idFromClassName( const TTQString &name )
return -1;
}
-bool WidgetDatabase::hasWidget( const TTQString &name )
+bool WidgetDatabase::hasWidget( const TQString &name )
{
return className2Id->find( name ) != 0;
}
@@ -748,14 +748,14 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r )
insert( dbcount++, r );
}
-TTQString WidgetDatabase::widgetGroup( const TTQString &g )
+TQString WidgetDatabase::widgetGroup( const TQString &g )
{
if ( wGroups->find( g ) == -1 )
wGroups->append( g );
return g;
}
-bool WidgetDatabase::isGroupEmpty( const TTQString &grp )
+bool WidgetDatabase::isGroupEmpty( const TQString &grp )
{
WidgetDatabaseRecord *r = 0;
for ( int i = 0; i < dbcount; ++i ) {
@@ -767,12 +767,12 @@ bool WidgetDatabase::isGroupEmpty( const TTQString &grp )
return true;
}
-TTQString WidgetDatabase::widgetGroup( int i )
+TQString WidgetDatabase::widgetGroup( int i )
{
setupDataBase( -1 );
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
- return TTQString::null;
+ return TQString::null;
}
int WidgetDatabase::numWidgetGroups()
@@ -781,7 +781,7 @@ int WidgetDatabase::numWidgetGroups()
return wGroups->count();
}
-bool WidgetDatabase::isGroupVisible( const TTQString &g )
+bool WidgetDatabase::isGroupVisible( const TQString &g )
{
setupDataBase( -1 );
return invisibleGroups->find( g ) == -1;
@@ -805,16 +805,16 @@ bool WidgetDatabase::isWhatsThisLoaded()
return whatsThisLoaded;
}
-void WidgetDatabase::loadWhatsThis( const TTQString &docPath )
+void WidgetDatabase::loadWhatsThis( const TQString &docPath )
{
- TTQString whatsthisFile = docPath + "/whatsthis";
- TTQFile f( whatsthisFile );
+ TQString whatsthisFile = docPath + "/whatsthis";
+ TQFile f( whatsthisFile );
if ( !f.open( IO_ReadOnly ) )
return;
- TTQTextStream ts( &f );
+ TQTextStream ts( &f );
while ( !ts.atEnd() ) {
- TTQString s = ts.readLine();
- TTQStringList l = TTQStringList::split( " | ", s );
+ TQString s = ts.readLine();
+ TQStringList l = TQStringList::split( " | ", s );
int id = idFromClassName( l[ 1 ] );
WidgetDatabaseRecord *r = at( id );
if ( r )
@@ -823,10 +823,10 @@ void WidgetDatabase::loadWhatsThis( const TTQString &docPath )
whatsThisLoaded = true;
}
-TTQPluginManager<WidgetInterface> *widgetManager()
+TQPluginManager<WidgetInterface> *widgetManager()
{
if ( !widgetPluginManager ) {
- widgetPluginManager = new TQPluginManager<WidgetInterface>( IID_Widget, TTQApplication::libraryPaths(), "/designer" );
+ widgetPluginManager = new TQPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "/designer" );
cleanup_manager.add( &widgetPluginManager );
}
return widgetPluginManager;