MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / closeEvent

Method closeEvent

src/openms_gui/source/VISUAL/APPLICATIONS/INIFileEditorWindow.cpp:130–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 }
129
130 void INIFileEditorWindow::closeEvent(QCloseEvent* event)
131 {
132 if (editor_->isModified())
133 {
134 QMessageBox::StandardButton result = QMessageBox::question(this, "Save?", "Do you want to save your changes?", QMessageBox::Ok | QMessageBox::Cancel | QMessageBox::Discard);
135 if (result == QMessageBox::Ok)
136 {
137 if (saveFile())
138 {
139 event->accept();
140 }
141 else
142 {
143 event->ignore();
144 }
145 }
146 else if (result == QMessageBox::Cancel)
147 {
148 event->ignore();
149 }
150 else
151 {
152 event->accept();
153 }
154 }
155 else
156 {
157 event->accept();
158 }
159 }
160
161 void INIFileEditorWindow::updateWindowTitle(bool update)
162 {

Callers

nothing calls this directly

Calls 1

isModifiedMethod · 0.45

Tested by

no test coverage detected