00001 /* -*- c++ -*- (for Emacs) 00002 * 00003 * mdidiagramwindow.h 00004 * Nodal 00005 * 00006 * Imported into Nodal by Aidan Lane on Thu Feb 24 2005. 00007 * Modifications Copyright (c) 2005 CEMA, Monash University. All rights reserved. 00008 * 00009 * Original file: 00010 * 00011 * projectgraphview.h 00012 * EverGreen 00013 * 00014 * Created by Aidan Lane on Tue Jul 13 2004. 00015 * Copyright (c) 2004 Aidan Lane. All rights reserved. 00016 * 00017 * This program is free software; you can redistribute it and/or modify 00018 * it under the terms of the GNU General Public License as published by 00019 * the Free Software Foundation; either version 2 of the License, or 00020 * (at your option) any later version. 00021 * 00022 * This program is distributed in the hope that it will be useful, 00023 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00025 * GNU General Public License for more details. 00026 * 00027 * You should have received a copy of the GNU General Public License 00028 * along with this program; if not, write to the Free Software 00029 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00030 */ 00031 00032 #ifndef MDIDIAGRAMWINDOW_H 00033 #define MDIDIAGRAMWINDOW_H 00034 00035 00036 #include <QMainWindow> 00037 #include "digestapplication.h" 00038 #include "MvcDiagram/abstractdiagramview.h" 00039 #include "MvcDigestDb/abstractdigestdbview.h" 00040 #include "MvcSettings/abstractsettingsview.h" 00041 00042 #include <jni.h> 00043 00044 class ToolChooser; 00045 class SuperScrollArea; 00046 class DiagramEditor; 00047 00048 00058 class MDIDiagramWindow : public MDIChild<QMainWindow, DigestApplication>, 00059 public AbstractDiagramView, 00060 public AbstractDigestDbView, 00061 public AbstractSettingsView { 00062 00063 Q_OBJECT 00064 00065 public: 00066 MDIDiagramWindow( AbstractController* diagramController, 00067 AbstractController* digestDbController, 00068 AbstractController* settingsController, 00069 DigestApplication* app, 00070 JavaVM* jvm, 00071 QWidget* parent = 0 ); 00072 00073 Digest::Tool currentTool() const; 00074 bool gridShown() const; 00075 bool hasSnapToGridOn() const; 00076 00077 00078 public slots: 00079 void setCurrentTool( Digest::Tool tool ); 00080 void setGridShown( bool shown ); 00081 void setSnapToGridOn( bool on ); 00082 00083 void showProperties(); 00084 00085 00086 protected: 00087 void showEvent( QShowEvent* ); 00088 00089 void customEvent( QEvent* ); 00090 00091 void changeDiagramControllerEvent( VChangeControllerEvent* ); 00092 void diagramResetEvent( VEvent* ); 00093 void renamedEvent( VRenamedEvent* ); 00094 void modifiedStateChangedEvent( VModifiedStateChangedEvent* ); 00095 00096 void changeDigestDbControllerEvent( VChangeControllerEvent* ); 00097 void digestDbResetEvent( VEvent* ); 00098 00099 void changeSettingsControllerEvent( VChangeControllerEvent* ); 00100 void settingsResetEvent( VEvent* ); 00101 00102 00103 private: 00104 void initUi(); 00105 00106 JavaVM* m_jvm; 00107 ToolChooser* m_toolChooser; 00108 SuperScrollArea* m_scrollArea; 00109 DiagramEditor* m_diagramEditor; 00110 00111 //TODO: re-implement me: ProjectSettings* settingsDialog; 00112 // TODO: rename the ProjectSettings class to something like "ProjectSettingsDialog" 00113 }; 00114 00115 00116 00117 #endif // ! MDIDIAGRAMWINDOW_H
1.5.2