00001 /********************************************************************** 00002 AbstractTab -- Basic GlobalSearch tab functionality 00003 00004 Copyright (C) 2009-2011 by David Lonie 00005 00006 This library is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU Library General Public License as 00008 published by the Free Software Foundation; either version 2.1 of the 00009 License, or (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public icense for more details. 00015 ***********************************************************************/ 00016 00017 #ifndef ABSTRACTTAB_H 00018 #define ABSTRACTTAB_H 00019 00020 #include <QtCore/QObject> 00021 00022 namespace GlobalSearch { 00023 class AbstractDialog; 00024 class Structure; 00025 class OptBase; 00026 00035 class AbstractTab : public QObject 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 00056 explicit AbstractTab( AbstractDialog *parent, OptBase *p ); 00057 00061 virtual ~AbstractTab(); 00062 00066 QWidget *getTabWidget() {return m_tab_widget;}; 00067 00068 public slots: 00073 virtual void lockGUI() {}; 00074 00082 virtual void readSettings(const QString &filename = "") { 00083 Q_UNUSED(filename);}; 00084 00092 virtual void writeSettings(const QString &filename = "") { 00093 Q_UNUSED(filename);}; 00094 00099 virtual void updateGUI() {}; 00100 00104 virtual void disconnectGUI() {}; 00105 00106 protected slots: 00111 virtual void initialize(); 00112 00121 void setBusyCursor(); 00122 00131 void clearBusyCursor(); 00132 00133 signals: 00137 void moleculeChanged(GlobalSearch::Structure*); 00138 00143 void startingBackgroundProcessing(); 00144 00149 void finishedBackgroundProcessing(); 00150 00154 void initialized(); 00155 00156 protected: 00158 QWidget *m_tab_widget; 00159 00161 AbstractDialog *m_dialog; 00162 00164 OptBase *m_opt; 00165 00167 bool m_isInitialized; 00168 }; 00169 } 00170 00171 #endif