File indexing completed on 2024-12-22 04:17:25
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2007 The University of Toronto * 0004 * netterfield@astro.utoronto.ca * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 ***************************************************************************/ 0012 0013 #ifndef BASICPLUGINDIALOG_H 0014 #define BASICPLUGINDIALOG_H 0015 0016 #include "datadialog.h" 0017 #include "datatab.h" 0018 0019 #include "kst_export.h" 0020 0021 #include "ui_basicplugintab.h" 0022 0023 namespace Kst { 0024 0025 class BasicPluginTab : public DataTab, Ui::BasicPluginTab { 0026 Q_OBJECT 0027 public: 0028 explicit BasicPluginTab(QString& pluginName, QWidget *parent = 0); 0029 virtual ~BasicPluginTab(); 0030 0031 void setObjectStore(ObjectStore *store); 0032 0033 DataObjectConfigWidget* configWidget() { return _configWidget; } 0034 0035 void loadSettings(); 0036 void saveSettings(); 0037 0038 private: 0039 DataObjectConfigWidget* _configWidget; 0040 0041 }; 0042 0043 class BasicPluginDialog : public DataDialog { 0044 Q_OBJECT 0045 public: 0046 BasicPluginDialog(QString& pluginName, ObjectPtr dataObject, QWidget *parent = 0); 0047 virtual ~BasicPluginDialog(); 0048 0049 protected: 0050 virtual QString tagString() const; 0051 virtual ObjectPtr createNewDataObject(); 0052 virtual ObjectPtr editExistingDataObject() const; 0053 0054 private: 0055 BasicPluginTab *_basicPluginTab; 0056 QString _pluginName; 0057 }; 0058 0059 } 0060 0061 #endif 0062 0063 // vim: ts=2 sw=2 et