本文整理汇总了C++中closed函数的典型用法代码示例。如果您正苦于以下问题:C++ closed函数的具体用法?C++ closed怎么用?C++ closed使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了closed函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: closed
void ConnectionBox::onCancel() {
emit closed();
}
示例2: closed
void DialogSecuritySubscriptions::on_pushButtonCancel_clicked()
{
emit closed();
close();
}
示例3: allocateRegs
void BackEnd::genCodeImpl(IRUnit& unit, AsmInfo* asmInfo) {
ctr++;
auto regs = allocateRegs(unit);
assert(checkRegisters(unit, regs)); // calls checkCfg internally.
Timer _t(Timer::codeGen);
LiveRegs live_regs = computeLiveRegs(unit, regs);
CodegenState state(unit, regs, live_regs, asmInfo);
CodeBlock& mainCodeIn = mcg->code.main();
CodeBlock& coldCodeIn = mcg->code.cold();
CodeBlock* frozenCode = &mcg->code.frozen();
CodeBlock mainCode;
CodeBlock coldCode;
bool relocate = false;
if (RuntimeOption::EvalJitRelocationSize &&
supportsRelocation() &&
coldCodeIn.canEmit(RuntimeOption::EvalJitRelocationSize * 3)) {
/*
* This is mainly to exercise the relocator, and ensure that its
* not broken by new non-relocatable code. Later, it will be
* used to do some peephole optimizations, such as reducing branch
* sizes.
* Allocate enough space that the relocated cold code doesn't
* overlap the emitted cold code.
*/
static unsigned seed = 42;
auto off = rand_r(&seed) & (cacheLineSize() - 1);
coldCode.init(coldCodeIn.frontier() +
RuntimeOption::EvalJitRelocationSize + off,
RuntimeOption::EvalJitRelocationSize - off, "cgRelocCold");
mainCode.init(coldCode.frontier() +
RuntimeOption::EvalJitRelocationSize + off,
RuntimeOption::EvalJitRelocationSize - off, "cgRelocMain");
relocate = true;
} else {
/*
* Use separate code blocks, so that attempts to use the mcg's
* code blocks directly will fail (eg by overwriting the same
* memory being written through these locals).
*/
coldCode.init(coldCodeIn.frontier(), coldCodeIn.available(),
coldCodeIn.name().c_str());
mainCode.init(mainCodeIn.frontier(), mainCodeIn.available(),
mainCodeIn.name().c_str());
}
if (frozenCode == &coldCodeIn) {
frozenCode = &coldCode;
}
auto frozenStart = frozenCode->frontier();
auto coldStart DEBUG_ONLY = coldCodeIn.frontier();
auto mainStart DEBUG_ONLY = mainCodeIn.frontier();
size_t hhir_count{0};
{
mcg->code.lock();
mcg->cgFixups().setBlocks(&mainCode, &coldCode, frozenCode);
SCOPE_EXIT {
mcg->cgFixups().setBlocks(nullptr, nullptr, nullptr);
mcg->code.unlock();
};
if (RuntimeOption::EvalHHIRGenerateAsserts) {
emitTraceCall(mainCode, unit.bcOff());
}
auto const linfo = layoutBlocks(unit);
auto main_start = mainCode.frontier();
auto cold_start = coldCode.frontier();
auto frozen_start = frozenCode->frontier();
Vasm vasm(&state.meta);
auto& vunit = vasm.unit();
// create the initial set of vasm numbered the same as hhir blocks.
for (uint32_t i = 0, n = unit.numBlocks(); i < n; ++i) {
state.labels[i] = vunit.makeBlock(AreaIndex::Main);
}
vunit.roots.push_back(state.labels[unit.entry()]);
vasm.main(mainCode);
vasm.cold(coldCode);
vasm.frozen(*frozenCode);
for (auto it = linfo.blocks.begin(); it != linfo.blocks.end(); ++it) {
auto block = *it;
auto v = block->hint() == Block::Hint::Unlikely ? vasm.cold() :
block->hint() == Block::Hint::Unused ? vasm.frozen() :
vasm.main();
FTRACE(6, "genBlock {} on {}\n", block->id(),
area_names[(unsigned)v.area()]);
auto b = state.labels[block];
vunit.blocks[b].area = v.area();
v.use(b);
hhir_count += genBlock(unit, v, vasm, state, block);
assert(v.closed());
assert(vasm.main().empty() || vasm.main().closed());
assert(vasm.cold().empty() || vasm.cold().closed());
assert(vasm.frozen().empty() || vasm.frozen().closed());
}
//.........这里部分代码省略.........
示例4: closed
void DeviceCollectionWND::closeEvent(QCloseEvent *e)
{
QWidget::closeEvent( e );
emit closed();
}
示例5: closed
void TypeTypeForm::applyClicked()
{
m_type->setNote(m_textNote->toPlainText());
emit closed(m_op, QVarPtr<TypeType>::asQVariant(m_type));
}
示例6: closed
void FixtureConsole::closeEvent(QCloseEvent* e)
{
emit closed();
}
示例7: closed
void SynthControl::closeEvent(QCloseEvent* ev)
{
emit closed(false);
QWidget::closeEvent(ev);
}
示例8: showMainWindow
void MainWindowPlugin::onOptionsChanged(const OptionsNode &ANode)
{
QWidget * widget = FMainWindowBorder ? (QWidget*)FMainWindowBorder : (QWidget*)FMainWindow;
if (ANode.path() == OPV_MAINWINDOW_STAYONTOP)
{
bool show = widget->isVisible();
if (ANode.value().toBool())
widget->setWindowFlags(widget->windowFlags() | Qt::WindowStaysOnTopHint);
else
widget->setWindowFlags(widget->windowFlags() & ~Qt::WindowStaysOnTopHint);
if (show)
showMainWindow();
}
#ifdef Q_OS_WIN
else if (ANode.path() == OPV_MAINWINDOW_MINIMIZETOTRAY_W7)
{
if (QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS7)
{
bool minimize = ANode.value().toBool();
FMainWindowBorder->setMinimizeOnClose(!minimize);
FMainWindowBorder->setShowInTaskBar(!minimize);
if (minimize)
disconnect(FMainWindowBorder ? (QObject*)FMainWindowBorder : (QObject*)FMainWindow, SIGNAL(closed()), this, SLOT(onMainWindowClosed()));
else
connect(FMainWindowBorder ? (QObject*)FMainWindowBorder : (QObject*)FMainWindow, SIGNAL(closed()), SLOT(onMainWindowClosed()));
}
else
FMainWindowBorder->setShowInTaskBar(false);
}
#endif
}
示例9: closePressed
void AbstractBox::onClose() {
closePressed();
emit closed();
}
示例10: closed
void PlayPanel::closeEvent(QCloseEvent* ev)
{
emit closed(false);
QWidget::closeEvent(ev);
}
示例11: closed
void Tuning::prepareRemove()
{
glView_->destroy();
emit closed(index_);
}
示例12: closed
void CDialogCreateTorrent::on_pushButtonSave_clicked()
{
emit closed();
close();
}
示例13: MainWindow
void ClientApplication::showMainWindow() {
mainWindow = new MainWindow();
connect(mainWindow, SIGNAL(closed()), SLOT(quit()));
mainWindow->show();
}
示例14: QMainWindow
MainWindow::MainWindow()
: QMainWindow(0)
, ui(new Ui::MainWindow)
, m_isKKeyPressed(false)
{
// Create the UI.
ui->setupUi(this);
#ifndef Q_WS_X11
ui->mainToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
#endif
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
setDockNestingEnabled(true);
// These use the icon theme on Linux, with fallbacks to the icons specified in QtDesigner for other platforms.
ui->actionOpen->setIcon(QIcon::fromTheme("document-open", ui->actionOpen->icon()));
ui->actionSave->setIcon(QIcon::fromTheme("document-save", ui->actionSave->icon()));
ui->actionEncode->setIcon(QIcon::fromTheme("media-record", ui->actionEncode->icon()));
// Connect UI signals.
connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openVideo()));
connect(ui->actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
// Accept drag-n-drop of files.
this->setAcceptDrops(true);
// Add the player widget.
QLayout* layout = new QVBoxLayout(ui->playerPage);
layout->setObjectName("centralWidgetLayout");
layout->setMargin(0);
m_player = new Player(this);
layout->addWidget(m_player);
connect(this, SIGNAL(producerOpened()), m_player, SLOT(onProducerOpened()));
connect(m_player, SIGNAL(showStatusMessage(QString)), this, SLOT(showStatusMessage(QString)));
connect(m_player, SIGNAL(inChanged(int)), this, SLOT(onCutModified()));
connect(m_player, SIGNAL(outChanged(int)), this, SLOT(onCutModified()));
// Add the docks.
m_propertiesDock = new QDockWidget(tr("Properties"));
m_propertiesDock->hide();
m_propertiesDock->setObjectName("propertiesDock");
m_propertiesDock->setWindowIcon(QIcon((":/icons/icons/view-form.png")));
m_propertiesDock->toggleViewAction()->setIcon(QIcon::fromTheme("view-form", m_propertiesDock->windowIcon()));
addDockWidget(Qt::LeftDockWidgetArea, m_propertiesDock);
ui->menuView->addAction(m_propertiesDock->toggleViewAction());
ui->mainToolBar->addAction(m_propertiesDock->toggleViewAction());
connect(m_propertiesDock->toggleViewAction(), SIGNAL(triggered(bool)), this, SLOT(onPropertiesDockTriggered(bool)));
m_recentDock = new RecentDock(this);
m_recentDock->hide();
addDockWidget(Qt::LeftDockWidgetArea, m_recentDock);
ui->menuView->addAction(m_recentDock->toggleViewAction());
ui->mainToolBar->addAction(m_recentDock->toggleViewAction());
connect(m_recentDock, SIGNAL(itemActivated(QString)), this, SLOT(open(QString)));
connect(m_recentDock->toggleViewAction(), SIGNAL(triggered(bool)), this, SLOT(onRecentDockTriggered(bool)));
m_playlistDock = new PlaylistDock(this);
m_playlistDock->hide();
addDockWidget(Qt::LeftDockWidgetArea, m_playlistDock);
ui->menuView->addAction(m_playlistDock->toggleViewAction());
ui->mainToolBar->addAction(m_playlistDock->toggleViewAction());
connect(m_playlistDock->toggleViewAction(), SIGNAL(triggered(bool)), this, SLOT(onPlaylistDockTriggered(bool)));
connect(m_playlistDock, SIGNAL(clipOpened(void*,int,int)), this, SLOT(openCut(void*, int, int)));
connect(m_playlistDock, SIGNAL(itemActivated(int)), this, SLOT(seekPlaylist(int)));
connect(m_playlistDock, SIGNAL(showStatusMessage(QString)), this, SLOT(showStatusMessage(QString)));
connect(m_playlistDock->model(), SIGNAL(created()), this, SLOT(onPlaylistCreated()));
connect(m_playlistDock->model(), SIGNAL(cleared()), this, SLOT(onPlaylistCleared()));
connect(m_playlistDock->model(), SIGNAL(closed()), this, SLOT(onPlaylistClosed()));
connect(m_playlistDock->model(), SIGNAL(modified()), this, SLOT(onPlaylistModified()));
connect(m_playlistDock->model(), SIGNAL(loaded()), this, SLOT(updateMarkers()));
connect(m_playlistDock->model(), SIGNAL(modified()), this, SLOT(updateMarkers()));
tabifyDockWidget(m_recentDock, m_propertiesDock);
tabifyDockWidget(m_propertiesDock, m_playlistDock);
m_recentDock->raise();
m_encodeDock = new EncodeDock(this);
m_encodeDock->hide();
addDockWidget(Qt::RightDockWidgetArea, m_encodeDock);
ui->menuView->addAction(m_encodeDock->toggleViewAction());
ui->mainToolBar->addAction(ui->actionEncode);
connect(this, SIGNAL(producerOpened()), m_encodeDock, SLOT(onProducerOpened()));
connect(m_encodeDock, SIGNAL(visibilityChanged(bool)), ui->actionEncode, SLOT(setChecked(bool)));
connect(m_encodeDock, SIGNAL(captureStateChanged(bool)), m_player, SLOT(onCaptureStateChanged(bool)));
connect(m_encodeDock, SIGNAL(captureStateChanged(bool)), m_propertiesDock, SLOT(setDisabled(bool)));
connect(m_encodeDock, SIGNAL(captureStateChanged(bool)), m_recentDock, SLOT(setDisabled(bool)));
connect(m_encodeDock, SIGNAL(captureStateChanged(bool)), ui->actionOpen, SLOT(setDisabled(bool)));
connect(m_encodeDock, SIGNAL(captureStateChanged(bool)), ui->actionOpenOther, SLOT(setDisabled(bool)));
connect(m_encodeDock, SIGNAL(captureStateChanged(bool)), ui->actionExit, SLOT(setDisabled(bool)));
connect(m_encodeDock, SIGNAL(captureStateChanged(bool)), this, SLOT(onCaptureStateChanged(bool)));
m_jobsDock = new JobsDock(this);
m_jobsDock->hide();
addDockWidget(Qt::RightDockWidgetArea, m_jobsDock);
tabifyDockWidget(m_encodeDock, m_jobsDock);
ui->menuView->addAction(m_jobsDock->toggleViewAction());
connect(&JOBS, SIGNAL(jobAdded()), m_jobsDock, SLOT(show()));
connect(&JOBS, SIGNAL(jobAdded()), m_jobsDock, SLOT(raise()));
connect(m_jobsDock, SIGNAL(visibilityChanged(bool)), this, SLOT(onJobsVisibilityChanged(bool)));
//.........这里部分代码省略.........
示例15: Q_UNUSED
void
DebugWindow::closeEvent( QCloseEvent* e )
{
Q_UNUSED( e )
emit closed();
}