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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • kio
  • kio
usernotificationhandler_p.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2012 Dawit Alemayehu <adawit@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef USERNOTIFICATIONHANDLER_P_H
20 #define USERNOTIFICATIONHANDLER_P_H
21 
22 #include <QObject>
23 #include <QHash>
24 #include <QCache>
25 #include <QPointer>
26 #include <QVariant>
27 
28 
29 namespace KIO {
30 class Slave;
31 class SlaveInterface;
32 
33 class UserNotificationHandler : public QObject
34 {
35  Q_OBJECT
36 public:
37  enum MessageBoxDataType {
38  MSG_TEXT,
39  MSG_CAPTION,
40  MSG_YES_BUTTON_TEXT,
41  MSG_NO_BUTTON_TEXT,
42  MSG_YES_BUTTON_ICON,
43  MSG_NO_BUTTON_ICON,
44  MSG_DONT_ASK_AGAIN,
45  MSG_META_DATA
46  };
47 
48  class Request
49  {
50 
51  public:
52  QString key() const;
53 
54  int type;
55  QPointer<Slave> slave;
56  QHash<MessageBoxDataType, QVariant> data;
57  };
58 
59  UserNotificationHandler(QObject* parent = 0);
60  virtual ~UserNotificationHandler();
61 
62  void requestMessageBox(SlaveInterface* iface, int type, const QHash<MessageBoxDataType, QVariant>& data);
63 
64 private Q_SLOTS:
65  void processRequest();
66 
67 private:
68  QCache<QString, int> m_cachedResults;
69  QList<Request*> m_pendingRequests;
70 };
71 }
72 
73 #endif
KIO::UserNotificationHandler::Request::key
QString key() const
Definition: usernotificationhandler.cpp:30
KIO::UserNotificationHandler::MSG_NO_BUTTON_TEXT
Definition: usernotificationhandler_p.h:41
KIO::UserNotificationHandler::MSG_YES_BUTTON_ICON
Definition: usernotificationhandler_p.h:42
KIO::UserNotificationHandler::requestMessageBox
void requestMessageBox(SlaveInterface *iface, int type, const QHash< MessageBoxDataType, QVariant > &data)
Definition: usernotificationhandler.cpp:53
KIO::SlaveInterface
There are two classes that specifies the protocol between application ( KIO::Job) and kioslave...
Definition: slaveinterface.h:98
KIO::UserNotificationHandler::MSG_TEXT
Definition: usernotificationhandler_p.h:38
QPointer
KIO::UserNotificationHandler::MSG_META_DATA
Definition: usernotificationhandler_p.h:45
KIO::UserNotificationHandler::UserNotificationHandler
UserNotificationHandler(QObject *parent=0)
Definition: usernotificationhandler.cpp:43
KIO::UserNotificationHandler::MSG_YES_BUTTON_TEXT
Definition: usernotificationhandler_p.h:40
KIO::UserNotificationHandler
Definition: usernotificationhandler_p.h:33
QHash< MessageBoxDataType, QVariant >
KIO::UserNotificationHandler::Request
Definition: usernotificationhandler_p.h:48
QObject
KIO::UserNotificationHandler::Request::type
int type
Definition: usernotificationhandler_p.h:54
KIO::UserNotificationHandler::MSG_DONT_ASK_AGAIN
Definition: usernotificationhandler_p.h:44
QString
QList
QCache< QString, int >
KIO::UserNotificationHandler::MSG_NO_BUTTON_ICON
Definition: usernotificationhandler_p.h:43
KIO::UserNotificationHandler::MSG_CAPTION
Definition: usernotificationhandler_p.h:39
KIO::UserNotificationHandler::MessageBoxDataType
MessageBoxDataType
Definition: usernotificationhandler_p.h:37
KIO::UserNotificationHandler::~UserNotificationHandler
virtual ~UserNotificationHandler()
Definition: usernotificationhandler.cpp:48
QObject::parent
QObject * parent() const
KIO::UserNotificationHandler::Request::data
QHash< MessageBoxDataType, QVariant > data
Definition: usernotificationhandler_p.h:56
KIO::UserNotificationHandler::Request::slave
QPointer< Slave > slave
Definition: usernotificationhandler_p.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • 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