summaryrefslogtreecommitdiffstats
path: root/kommander/editor/widgetdatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/widgetdatabase.cpp')
-rw-r--r--kommander/editor/widgetdatabase.cpp138
1 files changed, 69 insertions, 69 deletions
diff --git a/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp
index 3661f700..73349c3b 100644
--- a/kommander/editor/widgetdatabase.cpp
+++ b/kommander/editor/widgetdatabase.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -53,13 +53,13 @@ static TQStrList *wGroups;
static TQStrList *invisibleGroups;
static bool whatsThisLoaded = false;
#ifndef KOMMANDER
-static QPluginManager<WidgetInterface> *widgetPluginManager = 0;
+static TQPluginManager<WidgetInterface> *widgetPluginManager = 0;
#endif
static bool plugins_set_up = false;
static bool was_in_setup = false;
#ifndef KOMMANDER
-TQCleanupHandler<QPluginManager<WidgetInterface> > cleanup_manager;
+TQCleanupHandler<TQPluginManager<WidgetInterface> > cleanup_manager;
#endif
WidgetDatabaseRecord::WidgetDatabaseRecord()
@@ -89,7 +89,7 @@ WidgetDatabaseRecord::~WidgetDatabaseRecord()
one application doesn't make sense anyway and so you don't need more
than an instance of the widgetdatabase.
- For creating widgets, layouts, etc. see WidgetFactory.
+ For creating widgets, tqlayouts, etc. see WidgetFactory.
*/
/*!
@@ -134,35 +134,35 @@ void WidgetDatabase::setupDataBase( int id )
/* Designer widgets */
r = new WidgetDatabaseRecord;
r->iconName = "pushbutton.xpm";
- r->name = "TQPushButton";
+ r->name = TQPUSHBUTTON_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Push Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "toolbutton.xpm";
- r->name = "TQToolButton";
+ r->name = TQTOOLBUTTON_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Tool Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "radiobutton.xpm";
- r->name = "TQRadioButton";
+ r->name = TQRADIOBUTTON_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Radio Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "checkbox.xpm";
- r->name = "TQCheckBox";
+ r->name = TQCHECKBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Check Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "groupbox.xpm";
- r->name = "TQGroupBox";
+ r->name = TQGROUPBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Group Box");
r->isContainer = true;
@@ -170,7 +170,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "buttongroup.xpm";
- r->name = "TQButtonGroup";
+ r->name = TQBUTTONGROUP_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Button Group");
r->isContainer = true;
@@ -178,7 +178,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "frame.xpm";
- r->name = "TQFrame";
+ r->name = TQFRAME_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Frame");
r->isContainer = true;
@@ -186,7 +186,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "TQTabWidget";
+ r->name = TQTABWIDGET_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Tabwidget");
r->isContainer = true;
@@ -194,41 +194,41 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "listbox.xpm";
- r->name = "TQListBox";
+ r->name = TQLISTBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("List Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "listview.xpm";
- r->name = "TQListView";
+ r->name = TQLISTVIEW_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("List View");
append(r);
-#if !defined(QT_NO_ICONVIEW) || defined(UIC)
+#if !defined(TQT_NO_ICONVIEW) || defined(UIC)
r = new WidgetDatabaseRecord;
r->iconName = "iconview.xpm";
- r->name = "TQIconView";
+ r->name = TQICONVIEW_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("Icon View");
append(r);
#endif
-#if !defined(QT_NO_TABLE)
+#if !defined(TQT_NO_TABLE)
r = new WidgetDatabaseRecord;
r->iconName = "table.xpm";
- r->name = "TQTable";
+ r->name = TQTABLE_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("Table");
append(r);
#endif
-#if !defined(QT_NO_SQL)
+#if !defined(TQT_NO_SQL)
r = new WidgetDatabaseRecord;
r->iconName = "datatable.xpm";
r->includeFile = "tqdatatable.h";
- r->name = "TQDataTable";
+ r->name = TQDATATABLE_OBJECT_NAME_STRING;
r->group = widgetGroup("Database");
r->toolTip = i18n("Data Table");
append(r);
@@ -236,21 +236,21 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "lineedit.xpm";
- r->name = "TQLineEdit";
+ r->name = TQLINEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Line Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "spinbox.xpm";
- r->name = "TQSpinBox";
+ r->name = TQSPINBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Spin Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "dateedit.xpm";
- r->name = "QDateEdit";
+ r->name = TQDATEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Date Edit");
r->includeFile = "tqdatetimeedit.h";
@@ -258,7 +258,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "timeedit.xpm";
- r->name = "QTimeEdit";
+ r->name = TQTIMEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Time Edit");
r->includeFile = "tqdatetimeedit.h";
@@ -266,7 +266,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "datetimeedit.xpm";
- r->name = "QDateTimeEdit";
+ r->name = TQDATETIMEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Date-Time Edit");
r->includeFile = "tqdatetimeedit.h";
@@ -274,77 +274,77 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "multilineedit.xpm";
- r->name = "TQMultiLineEdit";
+ r->name = TQMULTILINEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->toolTip = i18n("Multi Line Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "richtextedit.xpm";
- r->name = "TQTextEdit";
+ r->name = TQTEXTEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Rich Text Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "combobox.xpm";
- r->name = "TQComboBox";
+ r->name = TQCOMBOBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Combo Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "slider.xpm";
- r->name = "TQSlider";
+ r->name = TQSLIDER_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Slider");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "scrollbar.xpm";
- r->name = "TQScrollBar";
+ r->name = TQSCROLLBAR_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Scrollbar");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "dial.xpm";
- r->name = "TQDial";
+ r->name = TQDIAL_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Dial");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "label.xpm";
- r->name = "TQLabel";
+ r->name = TQLABEL_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->toolTip = i18n("Label");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "lcdnumber.xpm";
- r->name = "TQLCDNumber";
+ r->name = TQLCDNUMBER_OBJECT_NAME_STRING;
r->group = widgetGroup("Display");
r->toolTip = i18n("LCD Number");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "progress.xpm";
- r->name = "TQProgressBar";
+ r->name = TQPROGRESSBAR_OBJECT_NAME_STRING;
r->group = widgetGroup("Display");
r->toolTip = i18n("Progress Bar");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "textview.xpm";
- r->name = "TQTextView";
+ r->name = TQTEXTVIEW_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->toolTip = i18n("Text View");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "textbrowser.xpm";
- r->name = "TQTextBrowser";
+ r->name = TQTEXTBROWSER_OBJECT_NAME_STRING;
r->group = widgetGroup("Display");
r->toolTip = i18n("Text Browser");
append(r);
@@ -355,42 +355,42 @@ void WidgetDatabase::setupDataBase( int id )
r->group = widgetGroup("Temp");
r->toolTip = i18n("Spacer");
r->whatsThis =
- i18n("The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of layouts.");
+ i18n("The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of tqlayouts.");
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQWidget";
+ r->name = TQWIDGET_OBJECT_NAME_STRING;
r->isForm = true;
r->group = widgetGroup("Forms");
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQDialog";
+ r->name = TQDIALOG_OBJECT_NAME_STRING;
r->group = widgetGroup("Forms");
r->isForm = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQWizard";
+ r->name = TQWIZARD_OBJECT_NAME_STRING;
r->group = widgetGroup("Forms");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QDesignerWizard";
+ r->name = "TQDesignerWizard";
r->group = widgetGroup("Forms");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QLayoutWidget";
+ r->name = TQLAYOUTWIDGET_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->includeFile = "";
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQSplitter";
+ r->name = TQSPLITTER_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->includeFile = "tqsplitter.h";
r->isContainer = true;
@@ -398,36 +398,36 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QDesignerTabWidget";
+ r->name = "TQDesignerTabWidget";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QDesignerWidget";
+ r->name = "TQDesignerWidget";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QDesignerDialog";
+ r->name = "TQDesignerDialog";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "";
- r->name = "TQMainWindow";
+ r->name = TQMAINWINDOW_OBJECT_NAME_STRING;
r->includeFile = "tqmainwindow.h";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
r = new WidgetDatabaseRecord;
- r->name = "TQDataBrowser";
+ r->name = TQDATABROWSER_OBJECT_NAME_STRING;
r->includeFile = "tqdatabrowser.h";
r->group = widgetGroup("Database");
r->toolTip = "Data Browser";
@@ -436,7 +436,7 @@ void WidgetDatabase::setupDataBase( int id )
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQDataView";
+ r->name = TQDATAVIEW_OBJECT_NAME_STRING;
r->includeFile = "tqdataview.h";
r->group = widgetGroup("Database");
r->toolTip = "Data View";
@@ -764,7 +764,7 @@ TQString WidgetDatabase::className( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->name;
}
@@ -777,7 +777,7 @@ TQString WidgetDatabase::group( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->group;
}
@@ -790,7 +790,7 @@ TQString WidgetDatabase::toolTip( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->toolTip;
}
@@ -803,7 +803,7 @@ TQString WidgetDatabase::whatsThis( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->whatsThis;
}
@@ -816,7 +816,7 @@ TQString WidgetDatabase::includeFile( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
if ( r->includeFile.isNull() )
return r->name.lower() + ".h";
return r->includeFile;
@@ -833,7 +833,7 @@ bool WidgetDatabase::isForm( int id )
return r->isForm;
}
-/*! Returns whether the widget registered as \a id can have children.
+/*! Returns whether the widget registered as \a id can have tqchildren.
*/
bool WidgetDatabase::isContainer( int id )
@@ -849,7 +849,7 @@ TQString WidgetDatabase::createWidgetName( int id )
{
setupDataBase( id );
TQString n = className( id );
- if ( n == "QLayoutWidget" )
+ if ( n == TQLAYOUTWIDGET_OBJECT_NAME_STRING )
n = "Layout";
if ( n[ 0 ] == 'Q' )
n = n.mid( 1 );
@@ -867,14 +867,14 @@ int WidgetDatabase::idFromClassName( const TQString &name )
setupDataBase( -1 );
if ( name.isEmpty() )
return 0;
- int *i = className2Id->find( name );
+ int *i = className2Id->tqfind( name );
if ( i )
return *i;
if ( name == "FormWindow" )
- return idFromClassName( "QLayoutWidget" );
+ return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING );
#ifdef UIC
setupDataBase( -2 );
- i = className2Id->find( name );
+ i = className2Id->tqfind( name );
if ( i )
return *i;
#endif
@@ -883,7 +883,7 @@ int WidgetDatabase::idFromClassName( const TQString &name )
bool WidgetDatabase::hasWidget( const TQString &name )
{
- return className2Id->find( name ) != 0;
+ return className2Id->tqfind( name ) != 0;
}
WidgetDatabaseRecord *WidgetDatabase::at( int index )
@@ -904,7 +904,7 @@ void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r )
widget_db[ index ] = r;
className2Id->insert( r->name, new int( index ) );
if ( index < dbcustom )
- dbcount = QMAX( dbcount, index );
+ dbcount = TQMAX( dbcount, index );
}
void WidgetDatabase::append( WidgetDatabaseRecord *r )
@@ -916,7 +916,7 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r )
TQString WidgetDatabase::widgetGroup( const TQString &g )
{
- if ( wGroups->find( g ) == -1 )
+ if ( wGroups->tqfind( g ) == -1 )
wGroups->append( g );
return g;
}
@@ -945,7 +945,7 @@ TQString WidgetDatabase::widgetGroup( int i )
setupDataBase( -1 );
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
- return TQString::null;
+ return TQString();
}
int WidgetDatabase::numWidgetGroups()
@@ -957,7 +957,7 @@ int WidgetDatabase::numWidgetGroups()
bool WidgetDatabase::isGroupVisible( const TQString &g )
{
setupDataBase( -1 );
- return invisibleGroups->find( g ) == -1;
+ return invisibleGroups->tqfind( g ) == -1;
}
int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r )
@@ -997,20 +997,20 @@ void WidgetDatabase::loadWhatsThis( const TQString &docPath )
}
-// ### Qt 3.1: make these publically accessible via QWidgetDatabase API
+// ### TQt 3.1: make these publically accessible via TQWidgetDatabase API
#ifndef KOMMANDER
#if defined(UIC)
bool dbnounload = false;
TQStringList *dbpaths = 0;
#endif
-QPluginManager<WidgetInterface> *widgetManager()
+TQPluginManager<WidgetInterface> *widgetManager()
{
if ( !widgetPluginManager ) {
#ifndef KOMMANDER
- widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "/designer" );
+ widgetPluginManager = new TQPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "/designer" );
#else
- widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "" );
+ widgetPluginManager = new TQPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "" );
#endif
cleanup_manager.add( &widgetPluginManager );