global_mainwindow = this;
ui->setupUi(this);
+ // The menus.
+ connect(ui->exit_action, &QAction::triggered, this, &MainWindow::exit_triggered);
+
global_disk_space_estimator = new DiskSpaceEstimator(bind(&MainWindow::report_disk_space, this, _1, _2));
disk_free_label = new QLabel(this);
disk_free_label->setStyleSheet("QLabel {padding-right: 5px;}");
});
}
+void MainWindow::exit_triggered()
+{
+ close();
+}
+
bool eventFilter(QObject *watched, QEvent *event) override;
void report_disk_space(off_t free_bytes, double estimated_seconds_left);
+ void exit_triggered();
private slots:
void relayout();
<property name="title">
<string>&File</string>
</property>
- <addaction name="actionQuit"/>
+ <addaction name="exit_action"/>
</widget>
<addaction name="menuFile"/>
</widget>
- <action name="actionQuit">
+ <action name="exit_action">
<property name="text">
- <string>Quit</string>
+ <string>E&xit</string>
</property>
</action>
</widget>