KNewStuff
downloadwidget_p.h
Go to the documentation of this file.
00001 /* 00002 knewstuff3/ui/downloaddialog.cpp. 00003 Copyright (C) 2005 by Enrico Ros <eros.kde@email.it> 00004 Copyright (C) 2005 - 2007 Josef Spillner <spillner@kde.org> 00005 Copyright (C) 2007 Dirk Mueller <mueller@kde.org> 00006 Copyright (C) 2007-2009 Jeremy Whiting <jpwhiting@kde.org> 00007 Copyright (C) 2009-2010 Frederik Gladhorn <gladhorn@kde.org> 00008 Copyright (C) 2010 Reza Fatahilah Shah <rshah0385@kireihana.com> 00009 00010 This library is free software; you can redistribute it and/or 00011 modify it under the terms of the GNU Lesser General Public 00012 License as published by the Free Software Foundation; either 00013 version 2.1 of the License, or (at your option) any later version. 00014 00015 This library is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 Lesser General Public License for more details. 00019 00020 You should have received a copy of the GNU Lesser General Public 00021 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 00024 #ifndef KNEWSTUFF3_UI_DOWNLOADWIDGET_P_H 00025 #define KNEWSTUFF3_UI_DOWNLOADWIDGET_P_H 00026 00027 #include <QtGui/QSortFilterProxyModel> 00028 #include <QtCore/QTimer> 00029 #include <QtGui/QScrollBar> 00030 #include <QListView> 00031 #include <kmessagebox.h> 00032 #include <kcomponentdata.h> 00033 #include <kaboutdata.h> 00034 00035 #include "ui/itemsmodel.h" 00036 #include "ui/itemsviewbasedelegate.h" 00037 #include "ui/entrydetailsdialog.h" 00038 00039 #include "ui_downloadwidget.h" 00040 00041 namespace KNS3 { 00042 class DownloadWidget; 00043 00044 class DownloadWidgetPrivate 00045 { 00046 public: 00047 DownloadWidget* q; 00048 EntryDetails* details; 00049 00050 // The engine that does all the work 00051 Engine *engine; 00052 Ui::DownloadWidget ui; 00053 // Model to show the entries 00054 ItemsModel* model; 00055 // Timeout for messge display 00056 QTimer* messageTimer; 00057 00058 ItemsViewBaseDelegate * delegate; 00059 00060 QString searchTerm; 00061 QSet<EntryInternal> changedEntries; 00062 00063 QSet<QString> categories; 00064 QSet<QString> providers; 00065 00066 QString titleText; 00067 QString m_configFile; 00068 bool dialogMode; 00069 00070 DownloadWidgetPrivate(DownloadWidget* q); 00071 ~DownloadWidgetPrivate(); 00072 00073 void init(const QString& configFile); 00074 void displayMessage(const QString & msg, KTitleWidget::MessageType type, int timeOutMs = 0); 00075 00076 void slotProvidersLoaded(); 00077 void slotEntriesLoaded(const KNS3::EntryInternal::List& entries); 00078 void slotEntryChanged(const KNS3::EntryInternal& entry); 00079 00080 void slotShowDetails(const KNS3::EntryInternal& entry); 00081 void slotShowOverview(); 00082 00083 void slotPayloadFailed(const EntryInternal& entry); 00084 void slotPayloadLoaded(KUrl url); 00085 00086 void slotResetMessage(); 00087 void slotNetworkTimeout(); 00088 void sortingChanged(); 00089 void slotSearchTextChanged(); 00090 void slotUpdateSearch(); 00091 void slotCategoryChanged(int); 00092 00093 void slotInfo(QString provider, QString server, QString version); 00094 void slotError(const QString& message); 00095 void scrollbarValueChanged(int value); 00096 00097 void slotUpload(); 00098 void slotListViewListMode(); 00099 void slotListViewIconMode(); 00100 void setListViewMode(QListView::ViewMode mode); 00101 }; 00102 00103 } 00104 00105 #endif
KDE 4.6 API Reference