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 00039 class KNEWSTUFF_EXPORT_DEPRECATED Button : public KPushButton 00040 { 00041 Q_OBJECT 00042 00043 public: 00058 Button(const QString& what, 00059 const QString& providerList, 00060 const QString& resourceType, 00061 QWidget* parent); 00062 00069 Button(QWidget* parent); 00070 00074 void setProviderList(const QString& providerList); 00075 00080 void setResourceType(const QString& resourceType); 00081 00086 void setButtonText(const QString& what); 00087 00088 Q_SIGNALS: 00093 void aboutToShowDialog(); 00094 00098 void dialogFinished(); 00099 00100 protected Q_SLOTS: 00101 void showDialog(); 00102 00103 private: 00104 void init(); 00105 00106 class ButtonPrivate; 00107 ButtonPrivate* const d; 00108 00109 QString m_providerList; 00110 QString m_type; 00111 Engine * m_engine; 00112 }; 00113 00114 } 00115 00116 #endif // KNEWSTUFFBUTTON_H
KDE 4.6 API Reference