You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
1.6 KiB
85 lines
1.6 KiB
14 years ago
|
#ifndef MAINWINDOW_H
|
||
|
#define MAINWINDOW_H
|
||
|
|
||
|
#include <QMainWindow>
|
||
14 years ago
|
#include <QSystemTrayIcon>
|
||
14 years ago
|
|
||
|
#include "graphwidget.h"
|
||
14 years ago
|
|
||
|
namespace Ui {
|
||
14 years ago
|
class MainWindow;
|
||
14 years ago
|
}
|
||
|
|
||
|
class MainWindow : public QMainWindow
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
14 years ago
|
|
||
14 years ago
|
explicit MainWindow(QWidget *parent = 0);
|
||
14 years ago
|
~MainWindow();
|
||
14 years ago
|
|
||
14 years ago
|
void statusBarMsg(const QString &msg);
|
||
14 years ago
|
void contentChanged(const bool &changed = true);
|
||
14 years ago
|
|
||
14 years ago
|
public slots:
|
||
14 years ago
|
|
||
14 years ago
|
void newFile();
|
||
|
void openFile(const QString &fileName = "");
|
||
|
void saveFile();
|
||
14 years ago
|
bool saveFileAs();
|
||
|
bool closeFile();
|
||
14 years ago
|
void exportScene();
|
||
14 years ago
|
|
||
14 years ago
|
void about();
|
||
|
|
||
14 years ago
|
void insertPicture();
|
||
|
|
||
14 years ago
|
void showMainToolbar(const bool &show = true);
|
||
|
void showStatusIconToolbar(const bool &show = true);
|
||
|
|
||
|
|
||
14 years ago
|
protected:
|
||
|
void closeEvent(QCloseEvent * event);
|
||
14 years ago
|
void keyPressEvent(QKeyEvent *event);
|
||
14 years ago
|
|
||
14 years ago
|
private:
|
||
14 years ago
|
|
||
14 years ago
|
void setTitle(const QString &title);
|
||
|
|
||
14 years ago
|
Ui::MainWindow *m_ui;
|
||
|
GraphWidget *m_graphicsView;
|
||
14 years ago
|
QString m_fileName;
|
||
14 years ago
|
bool m_contentChanged;
|
||
14 years ago
|
|
||
14 years ago
|
QAction *m_addNode;
|
||
|
QAction *m_delNode;
|
||
|
QAction *m_editNode;
|
||
|
QAction *m_scaleUpNode;
|
||
|
QAction *m_scaleDownNode;
|
||
|
QAction *m_nodeColor;
|
||
|
QAction *m_nodeTextColor;
|
||
|
QAction *m_addEdge;
|
||
|
QAction *m_delEdge;
|
||
|
QAction *m_zoomIn;
|
||
|
QAction *m_zoomOut;
|
||
14 years ago
|
QAction *m_esc;
|
||
14 years ago
|
QAction *m_hintMode;
|
||
|
QAction *m_moveNode;
|
||
|
QAction *m_subtree;
|
||
|
QAction *m_showMainToolbar;
|
||
|
QAction *m_showStatusIconToolbar;
|
||
|
|
||
14 years ago
|
QAction *m_insertIcon;
|
||
14 years ago
|
QAction *m_doIt;
|
||
14 years ago
|
QAction *m_trash;
|
||
|
QAction *m_info;
|
||
|
QAction *m_blocked;
|
||
|
QAction *m_question;
|
||
|
QAction *m_postpone;
|
||
|
QAction *m_delegate;
|
||
14 years ago
|
QAction *m_maybe;
|
||
14 years ago
|
};
|
||
|
|
||
|
#endif // MAINWINDOW_H
|