vlp-28 Moving editor to use QtDesigner files.
[vlp.git] / src / edit / editor.h
index 5c8fa502ac99929af98fc7e8e19990c3b137d18d..16f4cacb9a6517c4a29e4934e9fedea996d06a97 100644 (file)
@@ -7,6 +7,7 @@
 #include <QtGui/QPushButton>
 #include <QtGui/QLabel>
 
+#include "ui/editor-window.h"
 
 #define COMP_MODE      1
 #define GEN_MODE       2
@@ -22,17 +23,16 @@ typedef struct {
        QStringList names;
        char name[255];
 } CategoryEntry;
-
+/*
 class My_Edit : public QTextEdit {
        Q_OBJECT
 public:
        My_Edit(QWidget *parent = 0, const char *name = 0);
-       virtual void keyPressEvent(QKeyEvent *ev);
 signals:
        void cursorMove();
 };
-
-class Editor : public QMainWindow {
+*/
+class Editor : public QMainWindow, private Ui::EditorWindow {
        Q_OBJECT
 public:
        QString compiler_path;
@@ -45,32 +45,33 @@ public:
        void compile(int mode);
 
 public slots:
-       void load();
+       void on_actionOpen_triggered();
        void load(const char *fileName);
-       void save();
+       void on_actionSave_triggered();
        void save(const char *fileName);
-       void save_as();
-       void create();
-       void props();
-       void print();
-       void cmp();
+       void on_actionSave_as_triggered();
+       void on_actionNew_triggered();
+       void on_actionProperties_triggered();
+//     void print();
+       void on_actionCompile_triggered();
        void gen();
        void comp_all();
 
        void log_unit();
        void log_prog();
 
-       void findText();
-       void find_next();
+       void on_actionFind_triggered();
+       void on_actionFind_next_triggered();
        //void gotoline();
        void updateline();
 
 protected:
+//     virtual void editorKeyPressEvent(QKeyEvent *ev);
        void resizeEvent(QResizeEvent *);
        virtual void closeEvent (QCloseEvent * e);
 private:
-       My_Edit *e;
-       QTextEdit *msg;
+//     My_Edit *e;
+//     QTextEdit *msg;
        QLabel *position;
        QString fname;
        QString find_text;