SIEdit/app/mainwindow.h

68 lines
1.1 KiB
C
Raw Normal View History

2022-06-23 21:36:00 -04:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
2022-07-11 04:48:50 -04:00
#include <interleaf.h>
#include <object.h>
#include <QGroupBox>
2022-06-23 21:36:00 -04:00
#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-11 04:48:50 -04:00
#include "objectmodel.h"
#include "panel.h"
2022-07-11 04:48:50 -04:00
#include "viewer/bitmappanel.h"
#include "viewer/wavpanel.h"
2022-06-23 21:36:00 -04:00
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
void OpenFilename(const QString &s);
2022-06-23 21:36:00 -04:00
signals:
private:
//bool CloseFile();
void InitializeMenuBar();
2022-07-11 04:48:50 -04:00
void SetPanel(Panel *panel, si::Object *chunk);
void ExtractObject(si::Object *obj);
2022-06-24 13:46:25 -04:00
QStackedWidget *config_stack_;
QTreeView *tree_;
2022-07-04 02:34:49 -04:00
2022-07-11 04:48:50 -04:00
QGroupBox *action_grp_;
2022-06-24 13:46:25 -04:00
Panel *panel_blank_;
2022-07-11 04:48:50 -04:00
WavPanel *panel_wav_;
BitmapPanel *panel_bmp_;
2022-06-24 13:46:25 -04:00
2022-07-11 04:48:50 -04:00
ObjectModel model_;
si::Interleaf interleaf_;
si::Object *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-07-11 17:20:05 -04:00
void ExportFile();
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-07-11 04:48:50 -04:00
void ExtractClicked();
2022-06-23 21:36:00 -04:00
};
#endif // MAINWINDOW_H