ScriptWindow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef SCRIPTWINDOW_H
00032 #define SCRIPTWINDOW_H
00033
00034 #include "ScriptEdit.h"
00035
00036 #include <QMainWindow>
00037 #include <QMenu>
00038 #include <QCloseEvent>
00039 class ScriptingEnv;
00040 class ApplicationWindow;
00041 class LineNumberDisplay;
00042 class QAction;
00043
00045 class ScriptWindow: public QMainWindow
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 ScriptWindow(ScriptingEnv *env, ApplicationWindow *app);
00051 ~ScriptWindow(){exit(0);};
00052
00053 public slots:
00054 void newScript();
00055 void open(const QString& fn = QString());
00056 void save();
00057 void saveAs();
00058 void languageChange();
00059 virtual void setVisible(bool visible);
00060
00061 ScriptEdit* editor(){return te;};
00062 void executeAll(){te->executeAll();};
00063
00065 void showLineNumbers(bool show = true);
00066
00067 private slots:
00068 void setAlwaysOnTop(bool on);
00069
00070 signals:
00071 void visibilityChanged(bool visible);
00072
00073 private:
00074 void moveEvent( QMoveEvent* );
00075 void resizeEvent( QResizeEvent* );
00076
00077 void initMenu();
00078 void initActions();
00079 ScriptEdit *te;
00080 ApplicationWindow *d_app;
00081 LineNumberDisplay *d_line_number;
00082 QWidget *d_frame;
00083
00084 QString fileName;
00085
00086 QMenu *file, *edit, *run, *windowMenu;
00087 QAction *actionNew, *actionUndo, *actionRedo, *actionCut, *actionCopy, *actionPaste;
00088 QAction *actionExecute, *actionExecuteAll, *actionEval, *actionPrint, *actionOpen;
00089 QAction *actionSave, *actionSaveAs;
00090 QAction *actionAlwaysOnTop, *actionHide, *actionShowLineNumbers;
00091 };
00092
00093 #endif