• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KNewStuff

  • knewstuff
  • knewstuff3
uploaddialog_p.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 Frederik Gladhorn <gladhorn@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef KNEWSTUFF3_UI_UPLOADDIALOG_P_H
19 #define KNEWSTUFF3_UI_UPLOADDIALOG_P_H
20 
21 #include "upload/atticahelper.h"
22 #include "ui_uploaddialog.h"
23 
24 #include <attica/providermanager.h>
25 #include <attica/provider.h>
26 #include <attica/category.h>
27 #include <attica/content.h>
28 #include <attica/listjob.h>
29 #include <attica/license.h>
30 #include <attica/postjob.h>
31 
32 
33 #define FinishButton KDialog::User1
34 #define NextButton KDialog::User2
35 #define BackButton KDialog::User3
36 
37 class KPixmapSequenceWidget;
38 
39 namespace KNS3 {
40  class UploadDialog::Private
41  {
42  public:
43  Private(UploadDialog* q)
44  : q(q)
45  , currentPage(UserPasswordPage)
46  , finished(false)
47  , finishedPreview1(false)
48  , finishedPreview2(false)
49  , finishedPreview3(false)
50  , finishedContents(false)
51  {
52  }
53 
54  UploadDialog* q;
55 
56  enum WizardPage {
57  UserPasswordPage,
58  FileNewUpdatePage,
59  Details1Page,
60  Details2Page,
61  UploadFinalPage
62  };
63  WizardPage currentPage;
64 
65  Attica::Provider currentProvider() {
66  return atticaHelper->provider();
67  }
68 
69  Ui::UploadDialog ui;
70  KPixmapSequenceWidget* busyWidget;
71 
72  AtticaHelper* atticaHelper;
73 
74  KUrl uploadFile;
75  KUrl previewFile1;
76  KUrl previewFile2;
77  KUrl previewFile3;
78  QStringList categoryNames;
79  Attica::Category::List categories;
80  QString contentId;
81  bool finished;
82  bool finishedPreview1;
83  bool finishedPreview2;
84  bool finishedPreview3;
85  bool finishedContents;
86 
87  bool init(const QString& configfile);
88  void setBusy(const QString& message);
89  void setIdle(const QString& message);
90 
91  // change to page, set the focus also calls updatePage()
92  void _k_showPage(int page);
93 
94  // check after user input - for example enable the next button
95  void _k_updatePage();
96 
97  // next wizard page (next button clicked)
98  void _k_nextPage();
99  // go back one page
100  void _k_backPage();
101 
102  // after all has been done and said, do the uploading
103  void _k_startUpload();
104 
105  void _k_providersLoaded(const QStringList& providerNames);
106  void _k_providerChanged(const QString& providerName);
107 
108  // validation of login is done, go to next page if successfull, otherwise ask again
109  void _k_checkCredentialsFinished(bool);
110  void _k_categoriesLoaded(const Attica::Category::List& loadedCategories);
111  void _k_licensesLoaded(const Attica::License::List& licenses);
112  void _k_currencyLoaded(const QString& currency);
113  void _k_contentByCurrentUserLoaded(const Attica::Content::List& contentList);
114  void _k_updatedContentFetched(const Attica::Content& content);
115  void _k_previewLoaded(int index, const QImage& image);
116 
117  void _k_changePreview1();
118  void _k_changePreview2();
119  void _k_changePreview3();
120  void _k_preview1UploadFinished(Attica::BaseJob*);
121  void _k_preview2UploadFinished(Attica::BaseJob*);
122  void _k_preview3UploadFinished(Attica::BaseJob*);
123 
124  void _k_contentAdded(Attica::BaseJob*);
125  void _k_fileUploadFinished(Attica::BaseJob*);
126 
127  void uploadFileFinished();
128  void doUpload(const QString& index, const KUrl& filePath);
129 
130  void _k_priceToggled(bool);
131  void _k_updateContentsToggled(bool update);
132  void _k_detailsLinkLoaded(const QUrl& url);
133 
134  void getAccountBalance();
135  void _k_accountBalanceFetched(Attica::BaseJob* baseJob);
136  };
137 }
138 
139 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 22:02:24 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KNewStuff

Skip menu "KNewStuff"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal