52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
#ifndef FEDIPOTATO_GUI_WINDOW_MAIN_HPP
|
|
#define FEDIPOTATO_GUI_WINDOW_MAIN_HPP
|
|
|
|
#include "../ui/ui_window_main.h"
|
|
#include "channel.hpp"
|
|
|
|
#include <QMainWindow>
|
|
#include <QStandardItemModel>
|
|
#include <QModelIndex>
|
|
|
|
namespace FediPotato
|
|
{
|
|
|
|
class MainWindow : public QMainWindow, private Ui::MainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
//! Default constructor
|
|
explicit MainWindow(QMainWindow *parent = nullptr);
|
|
|
|
//! Copy constructor
|
|
MainWindow(const MainWindow &other) = delete;
|
|
|
|
//! Move constructor
|
|
MainWindow(MainWindow &&other) noexcept = delete;
|
|
|
|
//! Destructor
|
|
~MainWindow() noexcept override = default;
|
|
|
|
//! Copy assignment operator
|
|
MainWindow& operator=(const MainWindow &other) = delete;
|
|
|
|
//! Move assignment operator
|
|
MainWindow& operator=(MainWindow &&other) noexcept = delete;
|
|
|
|
private:
|
|
QStandardItemModel *_model_channel;
|
|
|
|
private:
|
|
void add_account();
|
|
|
|
private slots:
|
|
static void show_about();
|
|
static void open_website();
|
|
void clicked_channel(const QModelIndex &index);
|
|
};
|
|
|
|
} // namespace FediPotato
|
|
|
|
#endif // FEDIPOTATO_GUI_WINDOW_MAIN_HPP
|