2022-06-23 21:36:00 -04:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <chunk.h>
|
|
|
|
#include <QMainWindow>
|
2022-06-24 13:46:25 -04:00
|
|
|
#include <QStackedWidget>
|
2022-07-04 02:34:49 -04:00
|
|
|
#include <QTreeView>
|
2022-06-23 21:36:00 -04:00
|
|
|
|
2022-07-10 23:51:49 -04:00
|
|
|
#include "panel.h"
|
2022-06-23 21:36:00 -04:00
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
|
|
|
2022-06-27 12:44:50 -04:00
|
|
|
void OpenFilename(const QString &s);
|
|
|
|
|
2022-06-23 21:36:00 -04:00
|
|
|
signals:
|
|
|
|
|
|
|
|
private:
|
|
|
|
//bool CloseFile();
|
|
|
|
|
|
|
|
void InitializeMenuBar();
|
|
|
|
|
2022-06-27 12:44:50 -04:00
|
|
|
void SetPanel(Panel *panel, si::Chunk *chunk);
|
2022-06-24 13:46:25 -04:00
|
|
|
|
|
|
|
QStackedWidget *config_stack_;
|
|
|
|
|
2022-07-10 23:51:49 -04:00
|
|
|
QTreeView *tree_;
|
2022-07-04 02:34:49 -04:00
|
|
|
|
2022-06-24 13:46:25 -04:00
|
|
|
Panel *panel_blank_;
|
|
|
|
|
2022-06-27 12:44:50 -04:00
|
|
|
si::Chunk *last_set_data_;
|
2022-06-24 13:46:25 -04:00
|
|
|
|
2022-06-23 21:36:00 -04:00
|
|
|
private slots:
|
|
|
|
void OpenFile();
|
|
|
|
//bool SaveFile();
|
|
|
|
//bool SaveFileAs();
|
|
|
|
|
2022-06-24 13:46:25 -04:00
|
|
|
void SelectionChanged(const QModelIndex &index);
|
|
|
|
|
2022-07-04 02:34:49 -04:00
|
|
|
void ShowContextMenu(const QPoint &p);
|
|
|
|
|
|
|
|
void ExtractSelectedItems();
|
|
|
|
|
2022-06-23 21:36:00 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|