mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
RecentFileDialog is class instead of struct
This commit is contained in:
parent
e3b520a1f1
commit
2678bf1e05
@ -450,10 +450,10 @@ void MainWindow::on_actionOpenRecent_triggered()
|
|||||||
QSettings s(Ui::teamName, Ui::appName);
|
QSettings s(Ui::teamName, Ui::appName);
|
||||||
QStringList recentFiles = s.value(recentlyOpenedFilesSetting).toStringList();
|
QStringList recentFiles = s.value(recentlyOpenedFilesSetting).toStringList();
|
||||||
|
|
||||||
struct RecentFileDialog : public QDialog {
|
class RecentFileDialog : public QDialog {
|
||||||
|
|
||||||
RecentFileDialog(QStringList recentFiles, QWidget * parent = nullptr) : QDialog(parent), layout(this)
|
public:
|
||||||
{
|
RecentFileDialog(QWidget *parent, const QStringList& recentFiles) : QDialog(parent), layout(this) {
|
||||||
|
|
||||||
setWindowTitle(tr("Recently Opened Files"));
|
setWindowTitle(tr("Recently Opened Files"));
|
||||||
setMinimumWidth(600);
|
setMinimumWidth(600);
|
||||||
@ -473,6 +473,8 @@ void MainWindow::on_actionOpenRecent_triggered()
|
|||||||
layout.addWidget(&listWidget);
|
layout.addWidget(&listWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
QVBoxLayout layout;
|
QVBoxLayout layout;
|
||||||
QListWidget listWidget;
|
QListWidget listWidget;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user