]> Shamusworld >> Repos - ttedit/blobdiff - src/mainwindow.h
Added rotation tool, save/load capability.
[ttedit] / src / mainwindow.h
similarity index 54%
rename from src/ttemainwindow.h
rename to src/mainwindow.h
index 8de8ec1b99f7f6ee450542117612cab01f51f074..166a87ec92eec5bcb0cac994f2a0225163d7eca9 100644 (file)
@@ -1,67 +1,46 @@
 //
-// TTEMAINWINDOW.H: Header file
+// MAINWINDOW.H: Header file
 //
 // by James L. Hammons
 // (C) 2009 Underground Software
 //
 
-#ifndef __TTEMAINWINDOW_H__
-#define __TTEMAINWINDOW_H__
+#ifndef __MAINWINDOW_H__
+#define __MAINWINDOW_H__
 
-//Hrm. uh??? I thought this wasn't the way to do this stuff...???
 #include <QtGui>
 
-#if 0
-//#include <wx/wx.h>                                                           // So that whoever uses this can without having
-                                                                                               // to pull in a bunch of references manually
-//#include "ttf.h"
 
 // Forward declarations
 
-//class TTEditWin;
-//class TTEditWindow;
-//class CharWindow;
-//class ToolWindow;
-
-//
-// Class representing the entire Application
-//
-class TTEditApp: public QMainWindow
-{
-       public:
-               TTEditFrame * mainFrame;
-               CharWindow * charWin;
-               ToolWindow * toolPalette;
-               TTF font;
-               wxCursor * cur[8];
-
-               bool OnInit();
-               int OnExit();
-               void CreateResources(void);
-};
-
-DECLARE_APP(TTEditApp)
-#endif
-// Forward declarations
-
 class EditWindow;
 //class CharWindow;
 
-class TTEMainWindow: public QMainWindow
+
+class MainWindow: public QMainWindow
 {
        // All Qt apps require this macro
        Q_OBJECT
 
        public:
-               TTEMainWindow();
+               MainWindow();
 
        protected:
                void closeEvent(QCloseEvent * event);
 
        private slots:
-               void Open();
+               void NewGlyph(void);
+               void OpenFile(void);
+               void SaveFile(void);
 
        private:
+               QAction * CreateAction(QString name, QString tooltip, QString statustip,
+                       QIcon icon, QKeySequence key, bool checkable = false);
+               QAction * CreateAction(QString name, QString tooltip, QString statustip,
+                       QIcon icon, QKeySequence key1, QKeySequence key2, bool checkable = false);
+               void CreateActions(void);
+               void CreateMenus(void);
+               void CreateToolbars(void);
                void ReadSettings(void);
                void WriteSettings(void);
 
@@ -88,6 +67,9 @@ class TTEMainWindow: public QMainWindow
 
        DECLARE_EVENT_TABLE()
 #endif
+               QAction * newGlyphAct;
+               QAction * openFileAct;
+               QAction * saveFileAct;
 };
 
-#endif // __TTEMAINWINDOW_H__
+#endif // __MAINWINDOW_H__