KNewStuff
knewstuffbutton.h
Go to the documentation of this file.00001 /* 00002 This file is part of KNewStuff2. 00003 Copyright (c) 2004 Aaron J. Seigo <aseigo@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00019 #ifndef KNEWSTUFFBUTTON_H 00020 #define KNEWSTUFFBUTTON_H 00021 00022 #include <knewstuff2/knewstuff_export.h> 00023 00024 #include <kpushbutton.h> 00025 00026 namespace KNS 00027 { 00028 00029 class Engine; 00030 00031 // FIXME: port properly to KNS2, less accessors for apps, more *.knsrc usage 00037 class Button : public KPushButton 00038 { 00039 Q_OBJECT 00040 00041 public: 00056 Button(const QString& what, 00057 const QString& providerList, 00058 const QString& resourceType, 00059 QWidget* parent); 00060 00067 Button(QWidget* parent); 00068 00072 void setProviderList(const QString& providerList); 00073 00078 void setResourceType(const QString& resourceType); 00079 00084 void setButtonText(const QString& what); 00085 00086 Q_SIGNALS: 00091 void aboutToShowDialog(); 00092 00096 void dialogFinished(); 00097 00098 protected Q_SLOTS: 00099 void showDialog(); 00100 00101 private: 00102 void init(); 00103 00104 class ButtonPrivate; 00105 ButtonPrivate* const d; 00106 00107 QString m_providerList; 00108 QString m_type; 00109 Engine * m_engine; 00110 }; 00111 00112 } 00113 00114 #endif // KNEWSTUFFBUTTON_H