aboutsummaryrefslogtreecommitdiff
path: root/src/session/sessiondialog.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-04-13 15:44:09 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2020-04-13 15:44:09 +0300
commit396bc0c1721af8d3ee970228e7df457f6b2c73d5 (patch)
tree5aee4f0faec3fdfe616e1684dcb1736be9126bc1 /src/session/sessiondialog.h
parentAdd singleapplication.wrap (diff)
downloadsmolbote-396bc0c1721af8d3ee970228e7df457f6b2c73d5.tar.xz
Rewrite Session backend
Add session.hpp, containing structs that describe session data MainWindow, SubWindow and WebView can be created from Session::structs Opening new window will automatically open a default subwindow and tab if none were specified Add lib/session_formats Add JsonSession, to serialize/deserialize Session structs into JSON - add some tests clang-tidy: - fix various warnings - disable modernize-use-trailing-return-type check
Diffstat (limited to 'src/session/sessiondialog.h')
-rw-r--r--src/session/sessiondialog.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/session/sessiondialog.h b/src/session/sessiondialog.h
index 9bf8a68..0a04940 100644
--- a/src/session/sessiondialog.h
+++ b/src/session/sessiondialog.h
@@ -1,7 +1,7 @@
/*
* This file is part of smolbote. It's copyrighted by the contributors recorded
* in the version control history of the file, available from its original
- * location: https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote
+ * location: https://library.iserlohn-fortress.net/aqua/smolbote.git
*
* SPDX-License-Identifier: GPL-3.0
*/
@@ -9,6 +9,7 @@
#ifndef SMOLBOTE_SESSIONDIALOG_H
#define SMOLBOTE_SESSIONDIALOG_H
+#include "session.hpp"
#include <QDialog>
namespace Ui
@@ -22,16 +23,20 @@ class SessionDialog : public QDialog
public:
explicit SessionDialog(QWidget *parent = nullptr);
+ explicit SessionDialog(const SessionDialog &) = delete;
+ explicit SessionDialog(SessionDialog &&) = delete;
+ SessionDialog &operator=(const SessionDialog &) = delete;
+ SessionDialog &operator=(SessionDialog &&) = delete;
~SessionDialog() override;
- std::optional<QJsonObject> pickSession();
+ std::optional<QVector<Session::MainWindow>> pickSession();
private slots:
- QListWidgetItem *addItem(const QString &path);
void search(const QString &text);
- void openSession(const QString &filename);
+ static void openSession(const QString &filename);
private:
+ const QString create_window_str;
Ui::SessionDialog *ui;
QMetaObject::Connection accepted_connection;
};