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

KDEUI

  • kdeui
  • dialogs
ktip.h
Go to the documentation of this file.
1/*****************************************************************
2
3Copyright (c) 2000-2003 Matthias Hoelzer-Kluepfel <mhk@kde.org>
4 Tobias Koenig <tokoe@kde.org>
5 Daniel Molkentin <molkentin@kde.org>
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software and associated documentation files (the "Software"), to deal
9in the Software without restriction, including without limitation the rights
10to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11copies of the Software, and to permit persons to whom the Software is
12furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in
15all copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22CONNECTION 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 <QtCore/QStringList>
30
31#include <kdialog.h>
32
53class KDEUI_EXPORT KTipDatabase
54{
55 public:
62 explicit KTipDatabase( const QString &tipFile = QString() );
63
70 explicit KTipDatabase( const QStringList &tipFiles );
71
72 ~KTipDatabase();
73
77 QString tip() const;
78
82 void nextTip();
83
87 void prevTip();
88
89 private:
90 class Private;
91 Private* const d;
92
93 Q_DISABLE_COPY( KTipDatabase )
94};
95
103class KDEUI_EXPORT KTipDialog : public KDialog
104{
105 Q_OBJECT
106
107 public:
115 explicit KTipDialog( KTipDatabase *database, QWidget *parent = 0 );
116
120 ~KTipDialog();
121
138 static void showTip( QWidget *parent, const QString &tipFile = QString(), bool force = false );
139
151 static void showMultiTip( QWidget *parent, const QStringList &tipFiles, bool force = false );
152
159 static void showTip( const QString &tipFile = QString(), bool force = false );
160
167 static void setShowOnStart( bool show );
168
169 protected:
170 bool eventFilter( QObject*, QEvent* );
171
172 private:
173 class Private;
174 Private* const d;
175
176 Q_PRIVATE_SLOT( d, void _k_nextTip() )
177 Q_PRIVATE_SLOT( d, void _k_prevTip() )
178 Q_PRIVATE_SLOT( d, void _k_showOnStart( bool ) )
179 Q_DISABLE_COPY(KTipDialog)
180};
181
182#endif
183
KDialog::KDialog
KDialog(QWidget *parent=0, Qt::WindowFlags flags=0)
Creates a dialog.
Definition kdialog.cpp:189
KTipDatabase
A database for tips-of-the-day.
Definition ktip.h:54
KTipDatabase::prevTip
void prevTip()
The previous tip will become the current one.
Definition ktip.cpp:159
KTipDatabase::tip
QString tip() const
Returns the current tip.
Definition ktip.cpp:170
KTipDatabase::KTipDatabase
KTipDatabase(const QString &tipFile=QString())
This constructor reads in the tips from a file with the given name.
Definition ktip.cpp:115
KTipDatabase::nextTip
void nextTip()
The next tip will become the current one.
Definition ktip.cpp:148
KTipDialog::KTipDialog
KTipDialog(KTipDatabase *database, QWidget *parent=0)
Construct a tip dialog.
Definition ktip.cpp:225
KTipDialog::setShowOnStart
static void setShowOnStart(bool show)
Toggles the start behavior.
Definition ktip.cpp:390
KTipDialog::showMultiTip
static void showMultiTip(QWidget *parent, const QStringList &tipFiles, bool force=false)
Shows a tip.
Definition ktip.cpp:350
KTipDialog::showTip
static void showTip(QWidget *parent, const QString &tipFile=QString(), bool force=false)
Shows a tip.
Definition ktip.cpp:345
KTipDialog::eventFilter
bool eventFilter(QObject *, QEvent *)
Definition ktip.cpp:396
QObject
QWidget
kdialog.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.14.38 API Reference

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