themewidget.h
00001 /* 00002 * Copyright (C) 2005 Petri Damstén <petri.damsten@iki.fi> 00003 * 00004 * This file is part of SuperKaramba. 00005 * 00006 * SuperKaramba is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * SuperKaramba 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 License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with SuperKaramba; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 ****************************************************************************/ 00020 #ifndef THEMEWIDGET_H 00021 #define THEMEWIDGET_H 00022 00023 #include "themefile.h" 00024 #include <themewidget_layout.h> 00025 00030 class ThemeWidget : public ThemeWidgetLayout 00031 { 00032 Q_OBJECT 00033 TQ_OBJECT 00034 public: 00035 ThemeWidget(TQWidget *parent = 0, const char *name = 0); 00036 ThemeWidget(ThemeFile* tf); 00037 ~ThemeWidget(); 00038 00039 ThemeFile* themeFile() const { return m_themeFile; }; 00040 00041 int addInstance(); 00042 int instances() const { return m_instancePool.count(); }; 00043 void removeInstance(int instance); 00044 00045 void setDescriptionText(TQString text); 00046 void setHeaderText(TQString text); 00047 void showButton(bool show); 00048 00049 protected: 00050 void updateRunning(); 00051 void setDescriptionMaxHeight(); 00052 00053 private: 00054 ThemeFile* m_themeFile; 00055 TQValueList<int> m_instancePool; 00056 }; 00057 00058 #endif