本文整理汇总了C++中setupDataBase函数的典型用法代码示例。如果您正苦于以下问题:C++ setupDataBase函数的具体用法?C++ setupDataBase怎么用?C++ setupDataBase使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setupDataBase函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupDataBase
bool MetaDataBase::addCustomWidget( CustomWidget *wid )
{
setupDataBase();
for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) {
if ( *wid == *w ) {
for ( QValueList<QCString>::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) {
if ( !w->hasSignal( *it ) )
w->lstSignals.append( *it );
}
for ( QValueList<Slot>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) {
if ( !w->hasSlot( MetaDataBase::normalizeSlot( (*it2).slot ).latin1() ) )
w->lstSlots.append( *it2 );
}
for ( QValueList<Property>::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) {
if ( !w->hasProperty( (*it3).property ) )
w->lstProperties.append( *it3 );
}
delete wid;
return false;
}
}
WidgetDatabaseRecord *r = new WidgetDatabaseRecord;
r->name = wid->className;
r->group = WidgetDatabase::widgetGroup( "Custom" );
r->toolTip = wid->className;
r->iconSet = new QIconSet( *wid->pixmap, *wid->pixmap );
r->isContainer = wid->isContainer;
wid->id = WidgetDatabase::addCustomWidget( r );
cWidgets->append( wid );
return true;
}
示例2: setupDataBase
QString WidgetDatabase::widgetGroup( int i )
{
setupDataBase();
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
return QString::null;
}
示例3: QMainWindow
mainWindow::mainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::mainWindow)
{
//#ifndef WIN32
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
//#endif
ui->setupUi(this);
setupDataBase();
setupTable();
setupComboBox();
ui->mainToolBar->addAction(ui->actionAjouter_console);
ui->mainToolBar->addAction(ui->actionEditer_ligne);
ui->mainToolBar->addAction(ui->actionSupprimer_ligne);
connect(ui->buttonAdd, SIGNAL(clicked()), this, SLOT(addGame()));
connect(ui->actionAjouter_console, SIGNAL(triggered()), this, SLOT(addConsole()));
connect(ui->actionSupprimer_ligne, SIGNAL(triggered()), this, SLOT(deleteGame()));
connect(ui->actionEditer_ligne, SIGNAL(triggered()), this, SLOT(editGame()));
connect(ui->actionExporter_en_csv, SIGNAL(triggered()), this, SLOT(exportCSV()));
connect(ui->actionImporter_un_CSV, SIGNAL(triggered()), this, SLOT(importCSV()));
}
示例4: setupDataBase
QString WidgetDatabase::group( int id )
{
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
return QString::null;
return r->group;
}