![]() |
TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
|
00001 #ifndef TINKERCELL_NETWORKWINDOW_H 00002 #define TINKERCELL_NETWORKWINDOW_H 00003 00004 #include <QWidget> 00005 #include <QMainWindow> 00006 #include <QToolBar> 00007 #include <QHBoxLayout> 00008 00009 #ifndef TINKERCELLCOREEXPORT 00010 #ifdef Q_WS_WIN 00011 # ifndef TC_IMPORTS 00012 # define TINKERCELLCOREEXPORT __declspec(dllexport) 00013 # else 00014 # define TINKERCELLCOREEXPORT __declspec(dllimport) 00015 # endif 00016 #else 00017 # define TINKERCELLCOREEXPORT 00018 #endif 00019 #endif 00020 00021 namespace Tinkercell 00022 { 00023 00024 class MainWindow; 00025 class GraphicsScene; 00026 class TextEditor; 00027 class NetworkHandle; 00028 class ItemHandle; 00029 00030 class TINKERCELLCOREEXPORT NetworkWindow : public QMainWindow 00031 { 00032 Q_OBJECT 00033 00034 signals: 00041 void networkClosing(NetworkHandle *, bool*); 00047 void networkClosed(NetworkHandle *); 00048 public: 00050 NetworkHandle * network; 00051 00053 ItemHandle * handle; 00054 00056 GraphicsScene * scene; 00057 00059 TextEditor * editor; 00060 00063 virtual GraphicsScene * newScene(); 00064 00067 virtual TextEditor * newTextEditor(); 00068 00069 public slots: 00072 virtual void popOut(); 00075 virtual void popIn(); 00078 virtual void setFileName(const QString&); 00081 virtual void setWindowTitle(const QString&); 00082 00083 protected: 00087 virtual void closeEvent(QCloseEvent *event); 00091 virtual void focusInEvent ( QFocusEvent * ); 00095 virtual void resizeEvent (QResizeEvent * event); 00098 virtual void setAsCurrentWindow(); 00101 virtual void changeEvent ( QEvent * event ); 00103 virtual void connectToMainWindow(); 00104 00106 NetworkWindow(NetworkHandle * network, GraphicsScene * scene); 00107 00109 NetworkWindow(NetworkHandle * network, TextEditor * editor); 00110 00112 virtual ~NetworkWindow(); 00113 00115 QString filename; 00116 00117 friend class MainWindow; 00118 friend class GraphicsScene; 00119 friend class GraphicsView; 00120 friend class TextEditor; 00121 friend class NetworkHandle; 00122 friend class SymbolsTable; 00123 }; 00124 } 00125 00126 #endif 00127