KurusView  1.0
welcomewindow.h
1 #ifndef WELCOMEWINDOW_H
2 #define WELCOMEWINDOW_H
3 
4 #include <QMainWindow>
5 #include <QStringListModel>
6 #include <QSettings>
7 #include <QObject.h>
8 #include <QPoint.h>
9 #include <QGridLayout>
10 #include <QScrollArea>
11 
12 // wrap the class in Ui
13 namespace Ui {
14  class WelcomeWindow;
15 }
16 
17 class QFrame;
18 
19 
20 class WelcomeWindow : public QMainWindow {
22 Q_OBJECT
23 
24 public:
25 
26  explicit WelcomeWindow(QWidget *parent = nullptr);
27 
32  void addToRecentFiles(QStringList &inputFileNames);
33 
37  ~WelcomeWindow();
38 
39 private:
41  Ui::WelcomeWindow *ui;
42 
44  QStringList recentFilePaths;
45 
47  QScrollArea *scrollAreaX;
48  QGridLayout *mainLayout;
49 
51  QFrame *xFrame;
52 
54  const int maxFileNr;
55 
57  QSettings settings;
58 
60  QImage *img;
61  QPixmap p;
62 
72  QFrame *CreateNewRow(int number, QString title, QString subtitle, int generalFontSize = 18);
73 
78  void populateRecents();
79 
84  void showContextMenu(const QPoint &pos);
85 
90  void loadModel(const QStringList &paths);
91 
92 
93 public slots:
94 
98  void handleOpenButton();
99 
103  void handleAboutButton();
104 
108  void handleSettingsButton();
109 
113  void removeEntryFromRecents();
114 
118  void copyEntryToClipboard();
119 
123  void loadEntryAsModel();
124 
125 signals:
126 
128  void fileSelected(const QStringList &filePaths);
129 
130 protected:
135  bool eventFilter(QObject *obj, QEvent *event) override;
136 };
137 
138 #endif // WELCOMEWINDOW_H
Definition: dialog.h:7
Definition: welcomewindow.h:20