X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmainwindow.h;fp=src%2Fttemainwindow.h;h=166a87ec92eec5bcb0cac994f2a0225163d7eca9;hb=cf3ec188764cdf34ff3472ee9806aba3a772d2df;hp=8de8ec1b99f7f6ee450542117612cab01f51f074;hpb=0cdf0ebfb4b788156b8eb2c2acadd5f95fe5be26;p=ttedit diff --git a/src/ttemainwindow.h b/src/mainwindow.h similarity index 54% rename from src/ttemainwindow.h rename to src/mainwindow.h index 8de8ec1..166a87e 100644 --- a/src/ttemainwindow.h +++ b/src/mainwindow.h @@ -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 -#if 0 -//#include // 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__