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

KNewStuff

  • sources
  • kde-4.14
  • kdelibs
  • knewstuff
  • knewstuff2
  • ui
kdxsbutton.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KNewStuff2.
3  Copyright (c) 2005 - 2007 Josef Spillner <spillner@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #include "kdxsbutton.h"
20 
21 #include "knewstuff2/dxs/dxs.h"
22 
23 #include "knewstuff2/core/entry.h"
24 #include "knewstuff2/core/category.h"
25 
26 #include "downloaddialog.h"
27 #include "kdxsrating.h"
28 #include "kdxscomment.h"
29 #include "kdxscomments.h"
30 #include "kdxschanges.h"
31 #include "kdxstranslation.h"
32 
33 #include <QtGui/QLayout>
34 #include <QtXml/qdom.h>
35 #include <QtGui/QToolButton>
36 
37 #include <ktoolinvocation.h>
38 #include <kmessagebox.h>
39 #include <kdebug.h>
40 #include <klocale.h>
41 #include <kcursor.h>
42 #include <krun.h>
43 
44 #include <kmenu.h>
45 #include <kiconloader.h>
46 #include <kapplication.h>
47 #include <kprocess.h>
48 #include <kpassworddialog.h>
49 
50 using namespace KNS;
51 
52 KDXSButton::KDXSButton(QWidget *parent)
53  : QToolButton(parent), d(0)
54 {
55  m_entry = 0;
56  m_provider = 0;
57  m_dxs = 0;
58  m_engine = 0;
59 
60  // FIXME KDE4PORT
61  //setBackgroundColor(QColor(255, 255, 255));
62 
63  m_p = new KMenu(this);
64  action_install = m_p->addAction(SmallIcon("get-hot-new-stuff"),
65  i18n("Install"));
66  action_uninstall = m_p->addAction(i18n("Uninstall"));
67  action_comments = m_p->addAction(SmallIcon("help-about"),
68  i18n("Comments"));
69  action_changes = m_p->addAction(SmallIcon("help-about"),
70  i18n("Changelog"));
71 
72  m_history = new KMenu(this);
73  m_history->setTitle(i18n("Switch version"));
74 
75  // FIXME KDE4PORT
76  //m_history->insertItem(i18n("(Search...)"), historyinactive);
77  //m_history->setItemEnabled(historyinactive, false);
78 
79  action_historysub = m_p->addMenu(m_history);
80 
81  m_p->addSeparator();
82  action_info = m_p->addAction(i18n("Provider information"));
83 
84  m_contact = new KMenu(this);
85  m_contact->setIcon(SmallIcon("mail-message-new"));
86  m_contact->setTitle(i18n("Contact author"));
87 
88  KMenu *pcollab = new KMenu(this);
89  pcollab->setTitle(i18n("Collaboration"));
90 
91  action_collabrating = pcollab->addAction(i18n("Add Rating"));
92  action_collabcomment = pcollab->addAction(i18n("Add Comment"));
93  action_collabtranslation = pcollab->addAction(i18n("Translate"));
94  action_collabsubscribe = pcollab->addAction(i18n("Subscribe"));
95  action_collabremoval = pcollab->addAction(i18n("Report bad entry"));
96  pcollab->addMenu(m_contact);
97 
98  m_p->addSeparator();
99  action_collaboratesub = m_p->addMenu(pcollab);
100 
101  connect(this, SIGNAL(clicked()), SLOT(slotClicked()));
102 
103  connect(m_p, SIGNAL(triggered(QAction*)), SLOT(slotTriggered(QAction*)));
104 
105  connect(m_contact, SIGNAL(triggered(QAction*)), SLOT(slotTriggered(QAction*)));
106  connect(pcollab, SIGNAL(triggered(QAction*)), SLOT(slotTriggered(QAction*)));
107 
108  // FIXME KDE4PORT: dynamic qactions are needed here
109  //connect(m_history, SIGNAL(activated(int)), SLOT(slotVersionsActivated(int)));
110  //connect(m_history, SIGNAL(highlighted(int)), SLOT(slotVersionsHighlighted(int)));
111 
112  setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
113  setPopupMode(QToolButton::MenuButtonPopup);
114  setMenu(m_p);
115 
116  setEnabled(false);
117  show();
118 }
119 
120 KDXSButton::~KDXSButton()
121 {
122 }
123 
124 void KDXSButton::setEntry(Entry *e)
125 {
126  m_entry = e;
127 
128  if (m_engine) setEnabled(true);
129 
130  Entry::Status status = e->status();
131  switch (status) {
132  case Entry::Installed:
133  setText(i18n("Uninstall"));
134  action_install->setVisible(false);
135  action_uninstall->setVisible(true);
136  break;
137  case Entry::Updateable:
138  setText(i18n("Update"));
139  action_uninstall->setVisible(false);
140  action_install->setVisible(true);
141  break;
142  case Entry::Deleted:
144  setText(i18n("Install"));
145  action_uninstall->setVisible(false);
146  action_install->setVisible(true);
147  break;
148  default:
149  setText(i18n("Install"));
150  action_uninstall->setVisible(false);
151  action_install->setVisible(true);
152  }
153 
154  Author author = e->author();
155  if (!author.email().isEmpty()) {
156  m_contact->setEnabled(true);
157  action_contactbymail = m_contact->addAction(SmallIcon("mail-message-new"),
158  i18n("Send Mail"));
159  } else
160  m_contact->setEnabled(false);
161  if (!author.jabber().isEmpty()) {
162  action_contactbyjabber = m_contact->addAction(i18n("Contact on Jabber"));
163  }
164 }
165 
166 void KDXSButton::setProvider(const KNS::Provider *provider)
167 {
168  m_provider = provider;
169 
170  if (!provider) return;
171 
172  // FIXME: make it possible to query DxsEngine's DxsPolicy and react here?
173  // FIXME: handle switch-version and collab menus as well
174  if (provider->webService().isValid()) {
175  // the web service url is valid, so enable all the actions
176  action_collabrating->setEnabled(true);
177  action_collabcomment->setEnabled(true);
178  action_collabtranslation->setEnabled(true);
179  action_collabsubscribe->setEnabled(true);
180  action_collabremoval->setEnabled(true);
181 
182  action_comments->setEnabled(true);
183  action_changes->setEnabled(true);
184 
185  m_history->setEnabled(true);
186  } else {
187  action_collabrating->setEnabled(false);
188  action_collabcomment->setEnabled(false);
189  action_collabtranslation->setEnabled(false);
190  action_collabsubscribe->setEnabled(false);
191  action_collabremoval->setEnabled(false);
192 
193  action_comments->setEnabled(false);
194  action_changes->setEnabled(false);
195 
196  m_history->setEnabled(false);
197  }
198 }
199 
200 void KDXSButton::setEngine(DxsEngine *engine)
201 {
202  m_engine = engine;
203 
204  if (m_entry) setEnabled(true);
205 
206  m_dxs = new KNS::Dxs(m_engine, NULL);
207  m_dxs->setEndpoint(KUrl("http://new.kstuff.org/cgi-bin/hotstuff-dxs"));
208  // FIXME: use real endpoint as soon as provider is loaded
209  // FIXME: actually we would need a setProvider() here as well
210  // FIXME: another thing: shouldn't dxsengine own the dxs object?
211 
212  connect(m_dxs,
213  SIGNAL(signalInfo(QString,QString,QString)),
214  SLOT(slotInfo(QString,QString,QString)));
215  connect(m_dxs,
216  SIGNAL(signalCategories(QList<KNS::Category*>)),
217  SLOT(slotCategories(QList<KNS::Category*>)));
218  connect(m_dxs,
219  SIGNAL(signalEntries(KNS::Entry::List,Feed*)),
220  SLOT(slotEntries(KNS::Entry::List,Feed*)));
221  connect(m_dxs,
222  SIGNAL(signalComments(QStringList)),
223  SLOT(slotComments(QStringList)));
224  connect(m_dxs,
225  SIGNAL(signalChanges(QStringList)),
226  SLOT(slotChanges(QStringList)));
227  connect(m_dxs,
228  SIGNAL(signalHistory(QStringList)),
229  SLOT(slotHistory(QStringList)));
230  connect(m_dxs,
231  SIGNAL(signalRemoval(bool)),
232  SLOT(slotRemoval(bool)));
233  connect(m_dxs,
234  SIGNAL(signalSubscription(bool)),
235  SLOT(slotSubscription(bool)));
236  connect(m_dxs,
237  SIGNAL(signalComment(bool)),
238  SLOT(slotComment(bool)));
239  connect(m_dxs,
240  SIGNAL(signalRating(bool)),
241  SLOT(slotRating(bool)));
242  connect(m_dxs,
243  SIGNAL(signalFault()),
244  SLOT(slotFault()));
245  connect(m_dxs,
246  SIGNAL(signalError()),
247  SLOT(slotError()));
248 }
249 
250 void KDXSButton::slotInfo(QString provider, QString server, QString version)
251 {
252  QString infostring = i18n("Server: %1", server);
253  infostring += '\n' + i18n("Provider: %1", provider);
254  infostring += '\n' + i18n("Version: %1", version);
255 
256  KMessageBox::information(this,
257  infostring,
258  i18n("Provider information"));
259 }
260 
261 void KDXSButton::slotCategories(QList<KNS::Category*> categories)
262 {
263  for (QList<KNS::Category*>::Iterator it = categories.begin(); it != categories.end(); ++it) {
264  KNS::Category *category = (*it);
265  //kDebug() << "Category: " << category->name().representation();
266  }
267 }
268 
269 void KDXSButton::slotEntries(KNS::Entry::List entries, Feed * feed)
270 {
271  for (KNS::Entry::List::Iterator it = entries.begin(); it != entries.end(); ++it) {
272  KNS::Entry *entry = (*it);
273  //kDebug() << "Entry: " << entry->name().representation();
274  }
275 }
276 
277 void KDXSButton::slotComments(QStringList comments)
278 {
279  KDXSComments commentsdlg(this);
280 
281  for (QStringList::const_iterator it = comments.begin(); it != comments.end(); ++it) {
282  //kDebug() << "Comment: " << (*it);
283  commentsdlg.addComment("foo", (*it));
284  }
285 
286  commentsdlg.exec();
287 }
288 
289 void KDXSButton::slotChanges(QStringList changes)
290 {
291  KDXSChanges changesdlg(this);
292 
293  for (QStringList::const_iterator it = changes.begin(); it != changes.end(); ++it) {
294  //kDebug() << "Changelog: " << (*it);
295  changesdlg.addChangelog("v???", (*it));
296  }
297 
298  changesdlg.exec();
299 }
300 
301 void KDXSButton::slotHistory(QStringList entries)
302 {
303  m_history->clear();
304 
305  int i = 0;
306  for (QStringList::const_iterator it = entries.begin(); it != entries.end(); ++it) {
307  //kDebug() << (*it);
308 
309  // FIXME KDE4PORT
310  //m_history->insertItem(SmallIcon("view-history"),
311  // i18n((*it)), historyslots + i);
312  i++;
313  }
314 
315  if (entries.size() == 0) {
316  // FIXME KDE4PORT
317  //m_history->insertItem(i18n("(No history found)"), historydisabled);
318  //m_history->setItemEnabled(historydisabled, false);
319  }
320 
321  m_history->setCursor(Qt::ArrowCursor);
322 }
323 
324 void KDXSButton::slotRemoval(bool success)
325 {
326  if (success) {
327  KMessageBox::information(this,
328  i18n("The removal request was successfully registered."),
329  i18n("Removal of entry"));
330  } else {
331  KMessageBox::error(this,
332  i18n("The removal request failed."),
333  i18n("Removal of entry"));
334  }
335 }
336 
337 void KDXSButton::slotSubscription(bool success)
338 {
339  if (success) {
340  KMessageBox::information(this,
341  i18n("The subscription was successfully completed."),
342  i18n("Subscription to entry"));
343  } else {
344  KMessageBox::error(this,
345  i18n("The subscription request failed."),
346  i18n("Subscription to entry"));
347  }
348 }
349 
350 void KDXSButton::slotRating(bool success)
351 {
352  if (success) {
353  KMessageBox::information(this,
354  i18n("The rating was submitted successfully."),
355  i18n("Rating for entry"));
356  } else {
357  KMessageBox::error(this,
358  i18n("The rating could not be submitted."),
359  i18n("Rating for entry"));
360  }
361 }
362 
363 void KDXSButton::slotComment(bool success)
364 {
365  if (success) {
366  KMessageBox::information(this,
367  i18n("The comment was submitted successfully."),
368  i18n("Comment on entry"));
369  } else {
370  KMessageBox::error(this,
371  i18n("The comment could not be submitted."),
372  i18n("Comment on entry"));
373  }
374 }
375 
376 void KDXSButton::slotFault()
377 {
378  KMessageBox::error(this,
379  i18n("A protocol fault has occurred. The request has failed."),
380  i18n("Desktop Exchange Service"));
381 }
382 
383 void KDXSButton::slotError()
384 {
385  KMessageBox::error(this,
386  i18n("A network error has occurred. The request has failed."),
387  i18n("Desktop Exchange Service"));
388 }
389 
390 void KDXSButton::slotVersionsActivated(int id)
391 {
392  int version = id - historyslots;
393 
394  Q_UNUSED(version);
395  // and now???
396 }
397 
398 void KDXSButton::slotTriggered(QAction *action)
399 {
400  int ret;
401 
402  if (action == action_info) {
403  // FIXME: consider engine's DxsPolicy
404  if (m_provider->webService().isValid()) {
405  m_dxs->call_info();
406  } else {
407  slotInfo(m_provider->name().representation(),
408  QString(),
409  QString());
410  }
411  }
412  if (action == action_comments) {
413  m_dxs->call_comments(0);
414  }
415  if (action == action_changes) {
416  m_dxs->call_changes(2);
417  }
418  if (action == action_contactbymail) {
419  QString address = m_entry->author().email();
420  KToolInvocation::invokeMailer(address, i18n("KNewStuff contributions"), "");
421  }
422  if (action == action_contactbyjabber) {
423  new KRun(KUrl(QLatin1String("xmpp:") + m_entry->author().jabber()), this);
424  }
425  if (action == action_collabtranslation) {
426  if (!authenticate())
427  return;
428  KDXSTranslation translation(this);
429  ret = translation.exec();
430  if (ret == QDialog::Accepted) {
431  //QString s = comment.comment();
432  //if(!s.isEmpty())
433  //{
434  // m_dxs->call_comment(0, s);
435  //}
436  }
437  }
438  if (action == action_collabremoval) {
439  if (authenticate())
440  m_dxs->call_removal(0);
441  }
442  if (action == action_collabsubscribe) {
443  if (authenticate())
444  m_dxs->call_subscription(0, true);
445  }
446  if (action == action_uninstall) {
447  if (m_engine->uninstall(m_entry)) {
448  setText(i18n("Install"));
449  action_uninstall->setVisible(false);
450  action_install->setVisible(true);
451  }
452  }
453  if (action == action_install) {
454  connect(m_engine,
455  SIGNAL(signalPayloadLoaded(KUrl)),
456  SLOT(slotPayloadLoaded(KUrl)));
457  connect(m_engine,
458  SIGNAL(signalPayloadFailed(KNS::Entry*)),
459  SLOT(slotPayloadFailed(KNS::Entry*)));
460 
461  m_engine->downloadPayload(m_entry);
462  }
463  if (action == action_collabcomment) {
464  if (!authenticate())
465  return;
466  KDXSComment comment(this);
467  ret = comment.exec();
468  if (ret == QDialog::Accepted) {
469  QString s = comment.comment();
470  if (!s.isEmpty()) {
471  m_dxs->call_comment(0, s);
472  }
473  }
474  }
475  if (action == action_collabrating) {
476  if (!authenticate())
477  return;
478  KDXSRating rating(this);
479  ret = rating.exec();
480  if (ret == QDialog::Accepted) {
481  int r = rating.rating();
482  if (r >= 0) {
483  m_dxs->call_rating(0, r);
484  }
485  }
486  }
487 }
488 
489 void KDXSButton::slotVersionsHighlighted(int id)
490 {
491  //kDebug() << "highlighted!";
492 
493  if (id == historyinactive) {
494  //m_history->setItemEnabled(historyinactive, true);
495  m_history->setCursor(QCursor(Qt::WaitCursor));
496  //kDebug() << "hourglass!";
497 
498  m_dxs->call_history(0);
499  // .....
500  }
501 }
502 
503 void KDXSButton::slotClicked()
504 {
505  if (action_install->isVisible())
506  slotTriggered(action_install);
507  else
508  slotTriggered(action_uninstall);
509 }
510 
511 bool KDXSButton::authenticate()
512 {
513  if ((!m_username.isEmpty()) && (!m_password.isEmpty())) return true;
514 
515  KPasswordDialog dlg(this);
516  dlg.setPrompt(i18n("This operation requires authentication."));
517  int ret = dlg.exec();
518  if (ret == QDialog::Accepted) {
519  m_username = dlg.username();
520  m_password = dlg.password();
521 
522  return true;
523  }
524 
525  return false;
526 }
527 
528 void KDXSButton::slotPayloadLoaded(KUrl url)
529 {
530  //kDebug() << "PAYLOAD: success; try to install";
531 
532  Entry::Status status = m_entry->status();
533  if (status == Entry::Installed) {
534  setText(i18n("Uninstall"));
535  action_install->setVisible(false);
536  action_uninstall->setVisible(true);
537  } else {
538  setText(i18n("Install"));
539  action_uninstall->setVisible(false);
540  action_install->setVisible(true);
541  }
542 
543  m_engine->install(url.pathOrUrl());
544 }
545 
546 void KDXSButton::slotPayloadFailed(KNS::Entry *)
547 {
548  //kDebug() << "PAYLOAD: failed";
549 }
550 
551 #include "kdxsbutton.moc"
KNS::Author::jabber
QString jabber() const
Retrieve the author's jabber address.
Definition: knewstuff2/core/author.cpp:78
KDXSChanges
KNewStuff changelog window.
Definition: kdxschanges.h:36
i18n
QString i18n(const char *text)
KNS::Dxs::call_comments
void call_comments(int id)
Definition: dxs.cpp:92
KNS::Dxs::call_rating
void call_rating(int id, int rating)
Change the rating.
Definition: dxs.cpp:168
QWidget
KNS::Dxs::call_changes
void call_changes(int id)
Definition: dxs.cpp:104
kdxsrating.h
KNS::KDXSButton::slotRating
void slotRating(bool success)
Definition: kdxsbutton.cpp:350
QToolButton::setMenu
void setMenu(QMenu *menu)
KNS::Provider::name
KTranslatable name() const
Retrieves the common name of the provider.
Definition: knewstuff2/core/provider.cpp:64
KDXSChanges::addChangelog
void addChangelog(const QString &version, const QString &log)
Definition: kdxschanges.cpp:43
KNS::KDXSButton::slotVersionsActivated
void slotVersionsActivated(int id)
Definition: kdxsbutton.cpp:390
QWidget::setCursor
void setCursor(const QCursor &)
kdebug.h
KNS::Dxs::call_comment
void call_comment(int id, QString comment)
Definition: dxs.cpp:152
kapplication.h
KNS::KDXSButton::slotError
void slotError()
Definition: kdxsbutton.cpp:383
KNS::Entry
KNewStuff data entry container.
Definition: knewstuff2/core/entry.h:46
category.h
KNS::KDXSButton::slotChanges
void slotChanges(QStringList entries)
Definition: kdxsbutton.cpp:289
KMenu
KMessageBox::information
static void information(QWidget *parent, const QString &text, const QString &caption=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
entry.h
QAction::setVisible
void setVisible(bool)
KNS::Dxs
KNewStuff DXS proxy.
Definition: dxs.h:48
KNS::KDXSButton::slotComment
void slotComment(bool success)
Definition: kdxsbutton.cpp:363
QMenu::addAction
void addAction(QAction *action)
KNS::Entry::status
Status status()
Retrieves the entry's status.
Definition: knewstuff2/core/entry.cpp:216
kdxscomments.h
KNS::Author::email
QString email() const
Retrieve the author's email address.
Definition: knewstuff2/core/author.cpp:68
KNS::KDXSButton::setProvider
void setProvider(const KNS::Provider *provider)
Definition: kdxsbutton.cpp:166
QDialog::exec
int exec()
kiconloader.h
KToolInvocation::invokeMailer
static void invokeMailer(const QString &address, const QString &subject, const QByteArray &startup_id=QByteArray())
KNS::Entry::Status
Status
Status of the entry.
Definition: knewstuff2/core/entry.h:290
ktoolinvocation.h
klocale.h
QToolButton::triggered
void triggered(QAction *action)
QList::const_iterator
KNS::Entry::Deleted
Definition: knewstuff2/core/entry.h:295
KUrl
KNS::KDXSButton::slotComments
void slotComments(QStringList comments)
Definition: kdxsbutton.cpp:277
QList::size
int size() const
KRun
KNS::KDXSButton::slotHistory
void slotHistory(QStringList entries)
Definition: kdxsbutton.cpp:301
KDXSRating
KNewStuff rating submission window.
Definition: kdxsrating.h:38
KNS::Dxs::call_info
void call_info()
Definition: dxs.cpp:57
KNS::KDXSButton::KDXSButton
KDXSButton(QWidget *parent)
Definition: kdxsbutton.cpp:52
KNS::DxsEngine
KNewStuff DXS engine.
Definition: dxsengine.h:39
kcursor.h
KNS::KDXSButton::~KDXSButton
~KDXSButton()
Definition: kdxsbutton.cpp:120
QMenu::clear
void clear()
kprocess.h
QWidget::setEnabled
void setEnabled(bool)
KDXSComment::comment
QString comment()
Definition: kdxscomment.cpp:43
KNS::KDXSButton::slotFault
void slotFault()
Definition: kdxsbutton.cpp:376
QMenu::setIcon
void setIcon(const QIcon &icon)
kdxstranslation.h
kmenu.h
KNS::KDXSButton::slotInfo
void slotInfo(QString provider, QString server, QString version)
Definition: kdxsbutton.cpp:250
KNS::KDXSButton::slotCategories
void slotCategories(QList< KNS::Category * > categories)
Definition: kdxsbutton.cpp:261
kdxscomment.h
KNS::Entry::author
Author author() const
Retrieve the author of the object.
Definition: knewstuff2/core/entry.cpp:101
KNS::Category
KNewStuff category.
Definition: category.h:35
KNS::KDXSButton::setEntry
void setEntry(KNS::Entry *e)
Definition: kdxsbutton.cpp:124
KNS::KDXSButton::slotVersionsHighlighted
void slotVersionsHighlighted(int id)
Definition: kdxsbutton.cpp:489
kdxschanges.h
KNS::Author
KNewStuff author information.
Definition: knewstuff2/core/author.h:40
QString::isEmpty
bool isEmpty() const
QAbstractButton::clicked
void clicked(bool checked)
KNS::KDXSButton::slotPayloadFailed
void slotPayloadFailed(KNS::Entry *)
Definition: kdxsbutton.cpp:546
KUrl::pathOrUrl
QString pathOrUrl() const
QList::Iterator
typedef Iterator
QMenu::setTitle
void setTitle(const QString &title)
KNS::Dxs::call_subscription
void call_subscription(int id, bool subscribe)
Definition: dxs.cpp:137
QMenu::addSeparator
QAction * addSeparator()
QString
QList
kdxsbutton.h
KNS::KDXSButton::slotTriggered
void slotTriggered(QAction *action)
Definition: kdxsbutton.cpp:398
KNS::CoreEngine::uninstall
bool uninstall(KNS::Entry *entry)
Uninstalls an entry.
Definition: coreengine.cpp:1576
KNS::KTranslatable::representation
QString representation() const
Returns the string which matches most closely the current language.
Definition: ktranslatable.cpp:64
QStringList
QList::end
iterator end()
QToolButton
KNS::Dxs::call_history
void call_history(int id)
Definition: dxs.cpp:115
KNS::Entry::Installed
Definition: knewstuff2/core/entry.h:293
KNS::KDXSButton::slotEntries
void slotEntries(QList< KNS::Entry * > entries)
Definition: kdxsbutton.cpp:269
KNS::Dxs::call_removal
void call_removal(int id)
Definition: dxs.cpp:126
KPasswordDialog
krun.h
KDXSComment
KNewStuff comment addition window.
Definition: kdxscomment.h:36
KNS::KDXSButton::slotClicked
void slotClicked()
Definition: kdxsbutton.cpp:503
KNS::CoreEngine::install
bool install(const QString &payloadfile)
Installs an entry's payload file.
Definition: coreengine.cpp:1333
QUrl::isValid
bool isValid() const
kpassworddialog.h
QLatin1String
KNS::KDXSButton::slotSubscription
void slotSubscription(bool success)
Definition: kdxsbutton.cpp:337
version
unsigned int version()
QMenu::addMenu
QAction * addMenu(QMenu *menu)
QAction
QToolButton::setPopupMode
void setPopupMode(ToolButtonPopupMode mode)
KNS::KDXSButton::slotPayloadLoaded
void slotPayloadLoaded(KUrl url)
Definition: kdxsbutton.cpp:528
SmallIcon
QPixmap SmallIcon(const QString &name, int force_size, int state, const QStringList &overlays)
QAbstractButton::setText
void setText(const QString &text)
KDXSTranslation
KNewStuff translation submission window.
Definition: kdxstranslation.h:38
KNS::KDXSButton::setEngine
void setEngine(KNS::DxsEngine *engine)
Definition: kdxsbutton.cpp:200
QWidget::show
void show()
KNS::Provider::webService
KUrl webService() const
Retrieves the URL to the DXS Web Service.
Definition: knewstuff2/core/provider.cpp:114
dxs.h
KNS::KDXSButton::slotRemoval
void slotRemoval(bool success)
Definition: kdxsbutton.cpp:324
KNS::Dxs::setEndpoint
void setEndpoint(KUrl endpoint)
Definition: dxs.cpp:52
KDXSComments
KNewStuff comments window.
Definition: kdxscomments.h:36
KNS::Feed
KNewStuff feed.
Definition: feed.h:45
kmessagebox.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QToolButton::setToolButtonStyle
void setToolButtonStyle(Qt::ToolButtonStyle style)
QCursor
KNS::Provider
KNewStuff provider container.
Definition: knewstuff2/core/provider.h:51
QList::begin
iterator begin()
downloaddialog.h
KDXSComments::addComment
void addComment(const QString &username, const QString &comment)
Definition: kdxscomments.cpp:49
QAction::setEnabled
void setEnabled(bool)
KDXSRating::rating
int rating()
Definition: kdxsrating.cpp:66
KMessageBox::error
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
KNS::CoreEngine::downloadPayload
void downloadPayload(Entry *entry)
Downloads a payload file.
Definition: coreengine.cpp:300
KNS::Entry::Updateable
Definition: knewstuff2/core/entry.h:294
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:43 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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