summaryrefslogtreecommitdiff
path: root/src/main_window.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main_window.hpp')
-rw-r--r--src/main_window.hpp39
1 files changed, 29 insertions, 10 deletions
diff --git a/src/main_window.hpp b/src/main_window.hpp
index bc23b01..de1cb28 100644
--- a/src/main_window.hpp
+++ b/src/main_window.hpp
@@ -5,10 +5,14 @@
#include "getsuyomi.hpp"
#include <QtWidgets>
+#include <fud_status.hpp>
namespace getsuyomi {
-constexpr const char* AppName = "GetsuYomi";
+constexpr const char* AppVendor = "libfud";
+
+constexpr const char* AppName = "getsuyomi";
+
constexpr const char* AppVersionString = "1.0.0";
class GetsuyomiApp : public QMainWindow {
@@ -16,29 +20,44 @@ class GetsuyomiApp : public QMainWindow {
public:
GetsuyomiApp();
+ ~GetsuyomiApp() = default;
+ GetsuyomiApp(const GetsuyomiApp&) = delete;
+ GetsuyomiApp(GetsuyomiApp&&) = delete;
+ GetsuyomiApp& operator=(const GetsuyomiApp&) = delete;
+ GetsuyomiApp& operator=(GetsuyomiApp&&) = delete;
+
+ fud::FudStatus setup();
private:
- void setup();
+ /* Private methods */
void createActions();
void createMenus();
void createToolBar();
- Getsuyomi* m_getsuyomi;
+ /* Private data */
+ Getsuyomi* m_getsuyomi{nullptr};
- QAction* m_openFile;
- QAction* m_openDirectory;
- QAction* m_quitAction;
- QAction* m_nextAction;
- QAction* m_backAction;
+ QAction* m_openFile{nullptr};
+ QAction* m_openDirectory{nullptr};
+ QAction* m_quitAction{nullptr};
+ QAction* m_nextAction{nullptr};
+ QAction* m_backAction{nullptr};
- QMenu* m_menuBar;
- QToolBar* m_toolBar;
+ QMenu* m_menuBar{nullptr};
+ QToolBar* m_toolBar{nullptr};
+
+ QSettings* m_qtSettings{nullptr};
+ QString m_lastOpenedDirectory{};
private slots:
void openFile();
void openDirectory();
void quit();
+ void readSettings();
+ void writeSettings();
+ void closeEvent(QCloseEvent* event) override;
+
void next();
void back();
};