本文整理汇总了C++中QC_ApplicationWindow::move方法的典型用法代码示例。如果您正苦于以下问题:C++ QC_ApplicationWindow::move方法的具体用法?C++ QC_ApplicationWindow::move怎么用?C++ QC_ApplicationWindow::move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QC_ApplicationWindow
的用法示例。
在下文中一共展示了QC_ApplicationWindow::move方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
/**
* Main. Creates Application window.
*/
int main(int argc, char** argv)
{
RS_DEBUG->setLevel(RS_Debug::D_WARNING);
QApplication app(argc, argv);
QCoreApplication::setOrganizationName("LibreCAD");
QCoreApplication::setApplicationName("LibreCAD");
QCoreApplication::setApplicationVersion(XSTR(LC_VERSION));
QSettings settings;
bool first_load = settings.value("Startup/FirstLoad", 1).toBool();
const QString lpDebugSwitch0("-d"),lpDebugSwitch1("--debug") ;
const QString help0("-h"), help1("--help");
bool allowOptions=true;
QList<int> argClean;
for (int i=0; i<argc; i++)
{
QString argstr(argv[i]);
if(allowOptions&&QString::compare("--", argstr)==0)
{
allowOptions=false;
continue;
}
if (allowOptions && (help0.compare(argstr, Qt::CaseInsensitive)==0 ||
help1.compare(argstr, Qt::CaseInsensitive)==0 ))
{
qDebug()<<"librecad::usage: <options> <dxf file>";
qDebug()<<"-h, --help\tdisplay this message";
qDebug()<<"";
qDebug()<<" --help\tdisplay this message";
qDebug()<<"-d, --debug <level>";
RS_DEBUG->print( RS_Debug::D_NOTHING, "possible debug levels:");
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Nothing", RS_Debug::D_NOTHING);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Critical", RS_Debug::D_CRITICAL);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Error", RS_Debug::D_ERROR);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Warning", RS_Debug::D_WARNING);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Notice", RS_Debug::D_NOTICE);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Informational", RS_Debug::D_INFORMATIONAL);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Debugging", RS_Debug::D_DEBUGGING);
exit(0);
}
if ( allowOptions&& (argstr.startsWith(lpDebugSwitch0, Qt::CaseInsensitive) ||
argstr.startsWith(lpDebugSwitch1, Qt::CaseInsensitive) ))
{
argClean<<i;
// to control the level of debugging output use --debug with level 0-6, e.g. --debug3
// for a list of debug levels use --debug?
// if no level follows, the debugging level is set
argstr.remove(QRegExp("^"+lpDebugSwitch0));
argstr.remove(QRegExp("^"+lpDebugSwitch1));
char level;
if(argstr.size()==0)
{
if(i+1<argc)
{
if(QRegExp("\\d*").exactMatch(argv[i+1]))
{
++i;
qDebug()<<"reading "<<argv[i]<<" as debugging level";
level=argv[i][0];
argClean<<i;
}
else
level='3';
}
else
level='3'; //default to D_WARNING
}
else
level=argstr.toStdString()[0];
switch(level)
{
case '?' :
RS_DEBUG->print( RS_Debug::D_NOTHING, "possible debug levels:");
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Nothing", RS_Debug::D_NOTHING);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Critical", RS_Debug::D_CRITICAL);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Error", RS_Debug::D_ERROR);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Warning", RS_Debug::D_WARNING);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Notice", RS_Debug::D_NOTICE);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Informational", RS_Debug::D_INFORMATIONAL);
RS_DEBUG->print( RS_Debug::D_NOTHING, " %d Debugging", RS_Debug::D_DEBUGGING);
return 0;
case '0' + RS_Debug::D_NOTHING :
RS_DEBUG->setLevel( RS_Debug::D_NOTHING);
++i;
break;
case '0' + RS_Debug::D_CRITICAL :
RS_DEBUG->setLevel( RS_Debug::D_CRITICAL);
++i;
break;
//.........这里部分代码省略.........