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


C++ TypeList::isEmpty方法代码示例

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


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

示例1: typeList

Secrecy::TypeList Secrecy::typeList()
{
  static TypeList list;

  if ( list.isEmpty() )
    list << Public << Private << Confidential;

  return list;
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例2: typeList

Address::TypeList Address::typeList()
{
    static TypeList list;

    if(list.isEmpty())
        list << Dom << Intl << Postal << Parcel << Home << Work << Pref;

    return list;
}
开发者ID:serghei,项目名称:kde3-kdelibs,代码行数:9,代码来源:address.cpp

示例3: settings


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

	connect(mUi->actionDeleteFromDiagram, SIGNAL(triggered()), this, SLOT(deleteFromDiagram()));

	connect(mUi->tabs, SIGNAL(currentChanged(int)), this, SLOT(changeMiniMapSource(int)));
	connect(mUi->tabs, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));

	connect(mUi->actionCheckout, SIGNAL(triggered()), this, SLOT(doCheckout()));
	connect(mUi->actionCommit, SIGNAL(triggered()), this, SLOT(doCommit()));
	connect(mUi->actionExport_to_XMI, SIGNAL(triggered()), this, SLOT(exportToXmi()));
	connect(mUi->actionGenerate_to_Java, SIGNAL(triggered()), this, SLOT(generateToJava()));
	connect(mUi->actionGenerate_to_Hascol, SIGNAL(triggered()), this, SLOT(generateToHascol()));
	connect(mUi->actionShape_Edit, SIGNAL(triggered()), this, SLOT(openShapeEditor()));
	connect(mUi->actionGenerate_Editor, SIGNAL(triggered()), this, SLOT(generateEditor()));
	connect(mUi->actionGenerate_Editor_qrmc, SIGNAL(triggered()), this, SLOT(generateEditorWithQRMC()));
	connect(mUi->actionParse_Editor_xml, SIGNAL(triggered()), this, SLOT(parseEditorXml()));
	connect(mUi->actionPreferences, SIGNAL(triggered()), this, SLOT(showPreferencesDialog()));

	connect(mUi->actionParse_Hascol_sources, SIGNAL(triggered()), this, SLOT(parseHascol()));
	connect(mUi->actionParse_Java_Libraries, SIGNAL(triggered()), this, SLOT(parseJavaLibraries()));

	connect(mUi->actionPlugins, SIGNAL(triggered()), this, SLOT(settingsPlugins()));
	connect(mUi->actionShow_grid, SIGNAL(toggled(bool)), this, SLOT(showGrid(bool)));
	connect(mUi->actionShow_alignment, SIGNAL(toggled(bool)), this, SLOT(showAlignment(bool)));
	connect(mUi->actionSwitch_on_grid, SIGNAL(toggled(bool)), this, SLOT(switchGrid(bool)));
	connect(mUi->actionSwitch_on_alignment, SIGNAL(toggled(bool)), this, SLOT(switchAlignment(bool)));

	connect(mUi->actionHelp, SIGNAL(triggered()), this, SLOT(showHelp()));
	connect(mUi->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
	connect(mUi->actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));

	connect(mUi->actionShow, SIGNAL(triggered()), this, SLOT(showGestures()));

	connect(mUi->minimapZoomSlider, SIGNAL(valueChanged(int)), this, SLOT(adjustMinimapZoom(int)));

	connect(mUi->actionDebug, SIGNAL(triggered()), this, SLOT(debug()));
	connect(mUi->actionDebug_Single_step, SIGNAL(triggered()), this, SLOT(debugSingleStep()));

	connect(mUi->actionClear, SIGNAL(triggered()), this, SLOT(exterminate()));
	connect(mUi->save_metamodel, SIGNAL(triggered()), this, SLOT(saveMetaModel()));

	adjustMinimapZoom(mUi->minimapZoomSlider->value());
	initGridProperties();

	// Step 3: Ui connects are done.
	progress->setValue(40);

	QString workingDir = settings.value("workingDir", ".").toString();

	mRootIndex = QModelIndex();
	mModels = new models::Models(workingDir, mEditorManager);

	mPropertyModel = new PropertyEditorModel(mEditorManager, mModels->logicalModelAssistApi());

	mUi->paletteDock->setWidget(mUi->paletteToolbox);
	mUi->errorDock->setWidget(mUi->errorListWidget);
	mUi->errorListWidget->init(this);
	mUi->errorDock->setVisible(false);
	mUi->propertyEditor->setModel(mPropertyModel);
	mUi->propertyEditor->verticalHeader()->hide();
	mUi->propertyEditor->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
	mUi->propertyEditor->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch);
	mUi->propertyEditor->setItemDelegate(&mDelegate);

	connect(mUi->graphicalModelExplorer, SIGNAL(clicked(QModelIndex const &)), this, SLOT(graphicalModelExplorerClicked(QModelIndex)));
	connect(mUi->logicalModelExplorer, SIGNAL(clicked(QModelIndex const &)), this, SLOT(logicalModelExplorerClicked(QModelIndex)));

	mUi->graphicalModelExplorer->addAction(mUi->actionDeleteFromDiagram);
	mUi->logicalModelExplorer->addAction(mUi->actionDeleteFromDiagram);

	// Step 4: Property editor and model explorers are initialized.
	progress->setValue(60);
	loadPlugins();
	showMaximized();

	// Step 5: Plugins are loaded.
	progress->setValue(70);

	settings.beginGroup("MainWindow");
	if (!settings.value("maximized", true).toBool()) {
		showNormal();
		resize(settings.value("size", QSize(1024, 800)).toSize());
		move(settings.value("pos", QPoint(0, 0)).toPoint());
	}
	settings.endGroup();

	// Step 6: Save loaded, models initialized.
	progress->setValue(80);

	mListenerManager = new ListenerManager(mEditorManager.listeners()
										   , mModels->logicalModelAssistApi(), mModels->graphicalModelAssistApi());

	TypeList missingPlugins = mEditorManager.checkNeededPlugins(mModels->logicalRepoApi(), mModels->graphicalRepoApi());
	if (!missingPlugins.isEmpty()) {
		QString text = "These plugins are not present, but needed to load the save:\n";
		foreach (NewType const type, missingPlugins) {
			text += type.editor() + "\n";
			QMessageBox::warning(this, tr("Some plugins are missing"), text);
			close();
			return;
		}
开发者ID:nfrey,项目名称:qreal,代码行数:101,代码来源:mainwindow.cpp


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