• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
ktip.h
1 /*****************************************************************
2 
3 Copyright (c) 2000-2003 Matthias Hoelzer-Kluepfel <mhk@kde.org>
4  Tobias Koenig <tokoe@kde.org>
5  Daniel Molkentin <molkentin@kde.org>
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 __K_TIP_H__
27 #define __K_TIP_H__
28 
29 #include <tqstringlist.h>
30 
31 #include <kdialog.h>
32 
33 class TQCheckBox;
34 
35 class KTextBrowser;
36 
55 class TDEUI_EXPORT KTipDatabase
56 {
57 public:
64  KTipDatabase(const TQString &tipFile = TQString::null);
65 
72  KTipDatabase(const TQStringList &tipFiles);
73 
77  TQString tip() const;
78 
82  void nextTip();
83 
87  void prevTip();
88 
89 private:
90  void loadTips(const TQString &tipFile);
91 
92  void addTips(const TQString &tipFile);
93 
94  TQStringList mTips;
95 
96  int mCurrent;
97  class KTipDatabasePrivate;
98  KTipDatabasePrivate *d;
99 };
100 
108 class TDEUI_EXPORT KTipDialog : public KDialog
109 {
110  Q_OBJECT
111 public:
119  KTipDialog(KTipDatabase *db, TQWidget *parent = 0, const char *name = 0);
120  ~KTipDialog();
121 
138  static void showTip(TQWidget *parent, const TQString &tipFile = TQString::null, bool force=false);
139 
151  static void showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force=false);
152 
159  static void showTip(const TQString &tipFile = TQString::null, bool force = false);
160 
167  static void setShowOnStart(bool show);
168 
169 protected:
170  bool eventFilter(TQObject *, TQEvent *);
171  virtual void virtual_hook( int id, void* data );
172 
173 private slots:
174  void nextTip();
175  void prevTip();
176  void showOnStart(bool);
177 
178 private:
179  KTipDatabase *mDatabase;
180 
181  TQCheckBox *mTipOnStart;
182  KTextBrowser *mTipText;
183 
184  class KTipDialogPrivate;
185  KTipDialogPrivate *d;
186 
187  static KTipDialog *mInstance;
188 
189  TQColor mBaseColor, mBlendedColor, mTextColor;
190 };
191 
192 #endif
KTipDatabase
A database for tips-of-the-day.
Definition: ktip.h:55
KDialog
Dialog with extended non-modal support and methods for KDE standard compliance.
Definition: kdialog.h:52
KTextBrowser
Extended TQTextBrowser.
Definition: ktextbrowser.h:42
KTipDialog
A Tip-of-the-Day dialog.
Definition: ktip.h:108

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.8.8
This website is maintained by Timothy Pearson.