2010-06-17 17:24:36 +02:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
2010-06-17 18:30:32 +02:00
|
|
|
#include <QtGui/QMainWindow>
|
|
|
|
|
#include <QtGui/QMdiSubWindow>
|
2010-06-17 17:24:36 +02:00
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class MainWindow;
|
|
|
|
|
}
|
|
|
|
|
|
2010-06-17 18:30:32 +02:00
|
|
|
class OdfView;
|
2010-06-22 14:43:03 +02:00
|
|
|
class QFileSystemModel;
|
|
|
|
|
class QTreeView;
|
|
|
|
|
class QDockWidget;
|
|
|
|
|
class QModelIndex;
|
2010-06-17 18:30:32 +02:00
|
|
|
|
2010-06-17 17:24:36 +02:00
|
|
|
class MainWindow : public QMainWindow {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
MainWindow(QWidget *parent = 0);
|
|
|
|
|
~MainWindow();
|
2010-06-24 10:48:55 +02:00
|
|
|
void openFile(const QString& path);
|
2010-06-17 17:24:36 +02:00
|
|
|
|
2010-06-17 18:30:32 +02:00
|
|
|
private slots:
|
|
|
|
|
void open();
|
|
|
|
|
OdfView *createOdfView();
|
2010-06-22 14:43:03 +02:00
|
|
|
void loadOdf(const QModelIndex& index);
|
2010-06-29 03:23:37 -07:00
|
|
|
void setPath(const QString &path);
|
2010-06-17 18:30:32 +02:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QMdiSubWindow *findMdiChild(const QString &fileName);
|
|
|
|
|
void createActions();
|
|
|
|
|
void createToolBars();
|
|
|
|
|
QToolBar *fileToolBar;
|
|
|
|
|
QAction *openAct;
|
2010-06-17 17:24:36 +02:00
|
|
|
protected:
|
|
|
|
|
void changeEvent(QEvent *e);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Ui::MainWindow *ui;
|
2010-06-22 14:43:03 +02:00
|
|
|
QFileSystemModel* dirmodel;
|
|
|
|
|
QTreeView* dirview;
|
|
|
|
|
QDockWidget* dirdock;
|
2010-06-17 17:24:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|