当前位置: 首页>>代码示例>>C++>>正文


C++ setupDataBase函数代码示例

本文整理汇总了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;
}
开发者ID:serghei,项目名称:kde3-kdewebdev,代码行数:34,代码来源:metadatabase.cpp

示例2: setupDataBase

QString WidgetDatabase::widgetGroup( int i )
{
    setupDataBase();
    if ( i >= 0 && i < (int)wGroups->count() )
	return wGroups->at( i );
    return QString::null;
}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:7,代码来源:widgetdatabase.cpp

示例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()));
}
开发者ID:Konosprod,项目名称:EDBFVG,代码行数:26,代码来源:mainwindow.cpp

示例4: setupDataBase

QString WidgetDatabase::group( int id )
{
    setupDataBase( id );
    WidgetDatabaseRecord *r = at( id );
    if ( !r )
	return QString::null;
    return r->group;
}
开发者ID:app,项目名称:ananas-labs,代码行数:8,代码来源:widgetdatabase.cpp


注:本文中的setupDataBase函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。