00001 /* -*- c++ -*- (for Emacs) 00002 * 00003 * guicomponentwidgets.h 00004 * Digest 00005 * 00006 * Created by Aidan Lane on Fri Jul 01 2005. 00007 * Copyright (c) 2005-2006 Optimisation and Constraint Solving Group, 00008 * Monash University. All rights reserved. 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 */ 00024 00025 #ifndef GUICOMPONENTWIDGETS_H 00026 #define GUICOMPONENTWIDGETS_H 00027 00028 00029 #include "MvcDigestDb/abstractdigestdbview.h" 00030 00031 #include <QDialog> 00032 #include <QMainWindow> 00033 00034 00035 class AbstractController; 00036 00037 00046 class GuiDbComponentWidget : public QWidget, public AbstractDigestDbView { 00047 00048 Q_OBJECT 00049 00050 public: 00051 GuiDbComponentWidget( AbstractController* controller, 00052 QWidget* parent = 0, Qt::WindowFlags flags = 0 ); 00053 00054 signals: 00055 void visibilityToggled(); 00056 void request( const QString& message ); 00057 00058 public slots: 00059 virtual void execMessage( const QString& message ) { Q_UNUSED(message); } 00060 00061 protected: 00062 DEFINE_CUSTOM_VIEWEVENT_HANDLER 00063 virtual void showEvent( QShowEvent* e ); 00064 virtual void hideEvent( QHideEvent* e ); 00065 }; 00066 00067 00068 00077 class GuiDbComponentDialog : public QDialog, public AbstractDigestDbView { 00078 00079 Q_OBJECT 00080 00081 public: 00082 GuiDbComponentDialog( AbstractController* controller, 00083 QWidget* parent = 0, Qt::WindowFlags flags = 0 ); 00084 00085 signals: 00086 void visibilityToggled(); 00087 void request( const QString& message ); 00088 00089 public slots: 00090 virtual void execMessage( const QString& message ) { Q_UNUSED(message); } 00091 00092 protected: 00093 DEFINE_CUSTOM_VIEWEVENT_HANDLER 00094 virtual void showEvent( QShowEvent* e ); 00095 virtual void hideEvent( QHideEvent* e ); 00096 }; 00097 00098 00099 00108 class GuiDbComponentMainWindow : public QMainWindow, public AbstractDigestDbView { 00109 00110 Q_OBJECT 00111 00112 public: 00113 GuiDbComponentMainWindow( AbstractController* controller, 00114 QWidget* parent = 0, Qt::WindowFlags flags = 0 ); 00115 00116 signals: 00117 void visibilityToggled(); 00118 void request( const QString& message ); 00119 00120 public slots: 00121 virtual void execMessage( const QString& message ) { Q_UNUSED(message); } 00122 00123 protected: 00124 DEFINE_CUSTOM_VIEWEVENT_HANDLER 00125 virtual void showEvent( QShowEvent* ); 00126 virtual void hideEvent( QHideEvent* ); 00127 }; 00128 00129 00130 #endif // ! GUICOMPONENTWIDGETS_H
1.5.2