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


C++ QC_ApplicationWindow::show方法代码示例

本文整理汇总了C++中QC_ApplicationWindow::show方法的典型用法代码示例。如果您正苦于以下问题:C++ QC_ApplicationWindow::show方法的具体用法?C++ QC_ApplicationWindow::show怎么用?C++ QC_ApplicationWindow::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QC_ApplicationWindow的用法示例。


在下文中一共展示了QC_ApplicationWindow::show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
	QC_ApplicationWindow w;
	w.show();
	return a.exec();
}
开发者ID:jacklibj,项目名称:qcad,代码行数:7,代码来源:main.cpp

示例2: main

/**
 * Main. Creates Application window.
 *
 * Cleaning up #defines.
 */
int main(int argc, char** argv) {

    RS_DEBUG->setLevel(RS_Debug::D_WARNING);
        RS_DEBUG->print("param 0: %s", argv[0]);

        QCoreApplication::setApplicationName(XSTR(QC_APPNAME));
#if QT_VERSION < 0x040400
        /* No such property in Qt 4.3 */
#else
        QCoreApplication::setApplicationVersion(XSTR(QC_VERSION));
#endif


    QApplication app(argc, argv);


        // for image mime resources from png files
        //  TODO: kinda dirty to call that explicitly
//        QINITIMAGES_LIBRECAD();
#ifdef RS_SCRIPTING
//	qInitImages_librecad();
#endif

        for (int i=0; i<app.argc(); i++) {
                if (QString("--debug") == app.argv()[i]) {
                RS_DEBUG->setLevel(RS_Debug::D_DEBUGGING);
                }
        }

        QFileInfo prgInfo( QFile::decodeName(argv[0]) );
        QString prgDir(prgInfo.absolutePath());
    RS_SETTINGS->init(XSTR(QC_COMPANYKEY), XSTR(QC_APPKEY));
    RS_SYSTEM->init(XSTR(QC_APPNAME), XSTR(QC_VERSION), XSTR(QC_APPDIR), prgDir);

        RS_FileIO::instance()->registerFilter(&( RS_FilterLFF::createFilter));
        RS_FileIO::instance()->registerFilter( &(RS_FilterDXFRW::createFilter));
        RS_FileIO::instance()->registerFilter( &(RS_FilterCXF::createFilter));
        RS_FileIO::instance()->registerFilter( &(RS_FilterJWW::createFilter));
        RS_FileIO::instance()->registerFilter( &(RS_FilterDXF1::createFilter));

        // parse command line arguments that might not need a launched program:
        QStringList fileList = handleArgs(argc, argv);

        QString lang;
        QString langCmd;
        QString unit;

        RS_SETTINGS->beginGroup("/Defaults");
#ifndef QC_PREDEFINED_UNIT
        unit = RS_SETTINGS->readEntry("/Unit", "Invalid");
#else
        unit = RS_SETTINGS->readEntry("/Unit", QC_PREDEFINED_UNIT);
#endif
    RS_SETTINGS->endGroup();

        // show initial config dialog:
        if (unit=="Invalid") {
                RS_DEBUG->print("main: show initial config dialog..");
                QG_DlgInitial di(NULL);
                di.setText("<font size=\"+1\"><b>Welcome to " XSTR(QC_APPNAME) "</b></font>"
                "<br>"
                "Please choose the unit you want to use for new drawings and your "
                "preferred language.<br>"
                "You can changes these settings later in the "
                "Options Dialog of " XSTR(QC_APPNAME) ".");
                QPixmap pxm(":/main/intro_librecad.png");
                di.setPixmap(pxm);
                if (di.exec()) {
                        RS_SETTINGS->beginGroup("/Defaults");
                        unit = RS_SETTINGS->readEntry("/Unit", "None");
                RS_SETTINGS->endGroup();
                }
                RS_DEBUG->print("main: show initial config dialog: OK");
        }

#ifdef QSPLASHSCREEN_H
        RS_DEBUG->print("main: splashscreen..");

        QPixmap* pixmap = new QPixmap(":/main/splash_librecad.png");
# endif

        RS_DEBUG->print("main: init fontlist..");
    RS_FONTLIST->init();
        RS_DEBUG->print("main: init fontlist: OK");

        RS_DEBUG->print("main: init patternlist..");
    RS_PATTERNLIST->init();
        RS_DEBUG->print("main: init patternlist: OK");

        RS_DEBUG->print("main: init scriptlist..");
    RS_SCRIPTLIST->init();
        RS_DEBUG->print("main: init scriptlist: OK");

        RS_DEBUG->print("main: loading translation..");
        RS_SETTINGS->beginGroup("/Appearance");
//.........这里部分代码省略.........
开发者ID:tianqizi,项目名称:LibreCAD,代码行数:101,代码来源:main.cpp

示例3: main


//.........这里部分代码省略.........
                break;

            case '0' + RS_Debug::D_INFORMATIONAL :
                RS_DEBUG->setLevel( RS_Debug::D_INFORMATIONAL);
                ++i;
                break;

            case '0' + RS_Debug::D_DEBUGGING :
                RS_DEBUG->setLevel( RS_Debug::D_DEBUGGING);
                ++i;
                break;

            default :
                RS_DEBUG->setLevel(RS_Debug::D_DEBUGGING);
                break;
            }
        }
    }
    RS_DEBUG->print("param 0: %s", argv[0]);

    QFileInfo prgInfo( QFile::decodeName(argv[0]) );
    QString prgDir(prgInfo.absolutePath());
    RS_SETTINGS->init(app.organizationName(), app.applicationName());
    RS_SYSTEM->init(app.applicationName(), app.applicationVersion(), XSTR(QC_APPDIR), prgDir);

    // parse command line arguments that might not need a launched program:
    QStringList fileList = handleArgs(argc, argv, argClean);

    QString unit = settings.value("Defaults/Unit", "Invalid").toString();

    // show initial config dialog:
    if (first_load)
    {
        RS_DEBUG->print("main: show initial config dialog..");
        QG_DlgInitial di(nullptr);
        QPixmap pxm(":/main/intro_librecad.png");
        di.setPixmap(pxm);
        if (di.exec())
        {
            RS_SETTINGS->beginGroup("/Defaults");
            unit = RS_SETTINGS->readEntry("/Unit", "None");
            RS_SETTINGS->endGroup();
        }
        RS_DEBUG->print("main: show initial config dialog: OK");
    }

    auto splash = new QSplashScreen;

    bool show_splash = settings.value("Startup/ShowSplash", 1).toBool();

    if (show_splash)
    {
        QPixmap pixmap(":/main/splash_librecad.png");
        splash->setPixmap(pixmap);
        splash->setAttribute(Qt::WA_DeleteOnClose);
        splash->show();
        splash->showMessage(QObject::tr("Loading.."),
                            Qt::AlignRight|Qt::AlignBottom, Qt::black);
        app.processEvents();
        RS_DEBUG->print("main: splashscreen: OK");
    }

    RS_DEBUG->print("main: init fontlist..");
    RS_FONTLIST->init();
    RS_DEBUG->print("main: init fontlist: OK");
开发者ID:r-a-v-a-s,项目名称:LibreCAD,代码行数:66,代码来源:main.cpp

示例4: main


//.........这里部分代码省略.........
                    RS_DEBUG->setLevel(RS_Debug::D_DEBUGGING);
                    break;
                }
                //                }
//                else {
//                    RS_DEBUG->setLevel(RS_Debug::D_DEBUGGING);
//                }
            }
        }
        RS_DEBUG->print("param 0: %s", argv[0]);

        QFileInfo prgInfo( QFile::decodeName(argv[0]) );
        QString prgDir(prgInfo.absolutePath());
    RS_SETTINGS->init(XSTR(QC_COMPANYKEY), XSTR(QC_APPKEY));
    RS_SYSTEM->init(XSTR(QC_APPNAME), XSTR(QC_VERSION), XSTR(QC_APPDIR), prgDir);

        // parse command line arguments that might not need a launched program:
        QStringList fileList = handleArgs(argc, argv, argClean);

        QString lang;
        QString langCmd;
        QString unit;

        RS_SETTINGS->beginGroup("/Defaults");
#ifndef QC_PREDEFINED_UNIT
        unit = RS_SETTINGS->readEntry("/Unit", "Invalid");
#else
        unit = RS_SETTINGS->readEntry("/Unit", QC_PREDEFINED_UNIT);
#endif
    RS_SETTINGS->endGroup();

        // show initial config dialog:
        if (unit=="Invalid") {
                RS_DEBUG->print("main: show initial config dialog..");
                QG_DlgInitial di(NULL);
                di.setText("<font size=\"+1\"><b>Welcome to " XSTR(QC_APPNAME) "</b></font>"
                "<br>"
                "Please choose the unit you want to use for new drawings and your "
                "preferred language.<br>"
                "You can changes these settings later in the "
                "Options Dialog of " XSTR(QC_APPNAME) ".");
                QPixmap pxm(":/main/intro_librecad.png");
                di.setPixmap(pxm);
                if (di.exec()) {
                        RS_SETTINGS->beginGroup("/Defaults");
                        unit = RS_SETTINGS->readEntry("/Unit", "None");
                RS_SETTINGS->endGroup();
                }
                RS_DEBUG->print("main: show initial config dialog: OK");
        }

#ifdef QSPLASHSCREEN_H
//        RS_DEBUG->print("main: splashscreen..");

        QPixmap* pixmap = new QPixmap(":/main/splash_librecad.png");
#endif

        RS_DEBUG->print("main: init fontlist..");
    RS_FONTLIST->init();
        RS_DEBUG->print("main: init fontlist: OK");

        RS_DEBUG->print("main: init patternlist..");
    RS_PATTERNLIST->init();
        RS_DEBUG->print("main: init patternlist: OK");

        RS_DEBUG->print("main: init scriptlist..");
开发者ID:rmamba,项目名称:LibreCAD,代码行数:67,代码来源:main.cpp


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