MCPcopy Create free account
hub / github.com/Kitware/CMake / CMakeSetupDialog

Method CMakeSetupDialog

Source/QtDialog/CMakeSetupDialog.cxx:86–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86CMakeSetupDialog::CMakeSetupDialog()
87 : ExitAfterGenerate(true)
88 , CacheModified(false)
89 , ConfigureNeeded(true)
90 , CurrentState(Interrupting)
91{
92 QString title = QString(tr("CMake %1"));
93 title = title.arg(cmVersion::GetCMakeVersion());
94 this->setWindowTitle(title);
95
96 // create the GUI
97 QSettings settings;
98 settings.beginGroup("Settings/StartPath");
99 restoreGeometry(settings.value("geometry").toByteArray());
100 restoreState(settings.value("windowState").toByteArray());
101
102 this->AddVariableNames =
103 settings.value("AddVariableNames", QStringList("CMAKE_INSTALL_PREFIX"))
104 .toStringList();
105 this->AddVariableTypes =
106 settings.value("AddVariableTypes", QStringList("PATH")).toStringList();
107
108 QWidget* cont = new QWidget(this);
109 this->setupUi(cont);
110 this->Splitter->setStretchFactor(0, 3);
111 this->Splitter->setStretchFactor(1, 1);
112 this->setCentralWidget(cont);
113 this->ProgressBar->reset();
114 this->RemoveEntry->setEnabled(false);
115 this->AddEntry->setEnabled(false);
116 this->Preset->setStatusTip(PRESETS_DISABLED_TOOLTIP);
117
118 QByteArray p = settings.value("SplitterSizes").toByteArray();
119 this->Splitter->restoreState(p);
120
121 bool groupView = settings.value("GroupView", false).toBool();
122 this->setGroupedView(groupView);
123 this->groupedCheck->setCheckState(groupView ? Qt::Checked : Qt::Unchecked);
124
125 bool advancedView = settings.value("AdvancedView", false).toBool();
126 this->setAdvancedView(advancedView);
127 this->advancedCheck->setCheckState(advancedView ? Qt::Checked
128 : Qt::Unchecked);
129
130 QMenu* FileMenu = this->menuBar()->addMenu(tr("&File"));
131 this->ReloadCacheAction = FileMenu->addAction(tr("&Reload Cache"));
132 QObject::connect(this->ReloadCacheAction, &QAction::triggered, this,
133 &CMakeSetupDialog::doReloadCache);
134 this->DeleteCacheAction = FileMenu->addAction(tr("&Delete Cache"));
135 QObject::connect(this->DeleteCacheAction, &QAction::triggered, this,
136 &CMakeSetupDialog::doDeleteCache);
137 this->ExitAction = FileMenu->addAction(tr("E&xit"));
138 QObject::connect(this->ExitAction, &QAction::triggered, this,
139 &CMakeSetupDialog::close);
140 this->ExitAction->setShortcut(QKeySequence::Quit);
141
142 QMenu* ToolsMenu = this->menuBar()->addMenu(tr("&Tools"));
143 this->ConfigureAction = ToolsMenu->addAction(tr("&Configure"));

Callers

nothing calls this directly

Calls 10

setGroupedViewMethod · 0.95
setAdvancedViewMethod · 0.95
loadBuildPathsMethod · 0.95
enterStateMethod · 0.95
QStringClass · 0.85
connectFunction · 0.85
OpenReferenceManualFunction · 0.85
valueMethod · 0.80
resetMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected