KConfigWidgets

ktipdialog.h
1 /*****************************************************************
2 
3 Copyright (c) 2000-2003 Matthias Hoelzer-Kluepfel <[email protected]>
4  Tobias Koenig <[email protected]>
5  Daniel Molkentin <[email protected]>
6 
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13 
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16 
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 
24 ******************************************************************/
25 
26 #ifndef KTIP_H
27 #define KTIP_H
28 
29 #include <QDialog>
30 #include <QStringList>
31 
32 #include <kconfigwidgets_export.h>
33 
54 class KCONFIGWIDGETS_EXPORT KTipDatabase
55 {
56 public:
63  explicit KTipDatabase(const QString &tipFile = QString());
64 
71  explicit KTipDatabase(const QStringList &tipFiles);
72 
73  ~KTipDatabase();
74 
78  QString tip() const;
79 
83  void nextTip();
84 
88  void prevTip();
89 
90 private:
91  class Private;
92  Private *const d;
93 
94  Q_DISABLE_COPY(KTipDatabase)
95 };
96 
109 class KCONFIGWIDGETS_EXPORT KTipDialog : public QDialog
110 {
111  Q_OBJECT
112 
113 public:
121  explicit KTipDialog(KTipDatabase *database, QWidget *parent = nullptr);
122 
126  ~KTipDialog() override;
127 
144  static void showTip(QWidget *parent, const QString &tipFile = QString(), bool force = false);
145 
157  static void showMultiTip(QWidget *parent, const QStringList &tipFiles, bool force = false);
158 
165  static void showTip(const QString &tipFile = QString(), bool force = false);
166 
173  static void setShowOnStart(bool show);
174 
175 protected:
176  bool eventFilter(QObject *, QEvent *) override;
177 
178 private:
179  class Private;
180  Private *const d;
182 };
183 
184 #endif
185 
A database for tips-of-the-day.
Definition: ktipdialog.h:54
Q_DISABLE_COPY(Class)
virtual bool eventFilter(QObject *o, QEvent *e) override
A Tip-of-the-Day dialog.
Definition: ktipdialog.h:109
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 11 2020 22:43:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.