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

tdeui

  • tdeui
kpassivepopup.h
1/*
2 * Copyright : (C) 2001-2002 by Richard Moore
3 * Copyright : (C) 2004-2005 by Sascha Cunz
4 * License : This file is released under the terms of the LGPL, version 2.
5 * Email : rich@kde.org
6 * Email : sascha.cunz@tiscali.de
7 */
8
9#ifndef KPASSIVEPOPUP_H
10#define KPASSIVEPOPUP_H
11
12#include <tqframe.h>
13
14#include <tdelibs_export.h>
15
16class TQBoxLayout;
17class TQTimer;
18class TQLabel;
19class TQVBox;
20
66class TDEUI_EXPORT KPassivePopup : public TQFrame
67{
68 TQ_OBJECT
69 TQ_PROPERTY (bool autoDelete READ autoDelete WRITE setAutoDelete )
70 TQ_PROPERTY (int timeout READ timeout WRITE setTimeout )
71
72public:
77 enum PopupStyle
78 {
79 Boxed,
80 Balloon,
81 CustomStyle=128
82 };
83
87 KPassivePopup( TQWidget *parent=0, const char *name=0, WFlags f=0 );
88
92 KPassivePopup( WId parent, const char *name=0, WFlags f=0 );
93
98 KPassivePopup( int popupStyle, TQWidget *parent=0, const char *name=0, WFlags f=0 );
99
104 KPassivePopup( int popupStyle, WId parent, const char *name=0, WFlags f=0 );
105
109 virtual ~KPassivePopup();
110
114 void setView( TQWidget *child );
115
119 void setView( const TQString &caption, const TQString &text = TQString::null );
120
124 virtual void setView( const TQString &caption, const TQString &text, const TQPixmap &icon );
125
146 TQVBox * standardView( const TQString& caption, const TQString& text,
147 const TQPixmap& icon, TQWidget *parent = 0L );
148
152 TQWidget *view() const { return msgView; }
153
157 int timeout() const { return hideDelay; }
158
165 virtual void setAutoDelete( bool autoDelete );
166
171 bool autoDelete() const { return m_autoDelete; }
172
178 void setAnchor( const TQPoint& anchor );
179
180 // TODO KDE4: give all the statics method a const TQPoint p = TQPoint() that in
181 // case the point is not null calls the show(cosnt TQPoint &p) method instead
182 // the show() one.
189 static KPassivePopup *message( const TQString &text, TQWidget *parent, const char *name=0 );
190
197 static KPassivePopup *message( const TQString &caption, const TQString &text,
198 TQWidget *parent, const char *name=0 );
199
206 static KPassivePopup *message( const TQString &caption, const TQString &text,
207 const TQPixmap &icon,
208 TQWidget *parent, const char *name=0, int timeout = -1 );
209
216 static KPassivePopup *message( const TQString &caption, const TQString &text,
217 const TQPixmap &icon,
218 WId parent, const char *name=0, int timeout = -1 );
219
226 static KPassivePopup *message( int popupStyle, const TQString &text, TQWidget *parent,
227 const char *name=0 );
228
235 static KPassivePopup *message( int popupStyle, const TQString &caption, const TQString &text,
236 TQWidget *parent, const char *name=0 );
237
244 static KPassivePopup *message( int popupStyle, const TQString &caption, const TQString &text,
245 const TQPixmap &icon,
246 TQWidget *parent, const char *name=0, int timeout = -1 );
247
254 static KPassivePopup *message( int popupStyle, const TQString &caption, const TQString &text,
255 const TQPixmap &icon,
256 WId parent, const char *name=0, int timeout = -1 );
257
258
259public slots:
268 void setTimeout( int delay );
269
273 virtual void show();
274
279 void show(const TQPoint &p);
280
281signals:
285 void clicked();
286
290 void clicked( TQPoint pos );
291
295 void hidden(KPassivePopup*);
296
297protected:
301 virtual void positionSelf();
302
307 virtual void hideEvent( TQHideEvent * );
308
312 void moveNear( TQRect target );
313
317 virtual void mouseReleaseEvent( TQMouseEvent *e );
318
327 TQRect defaultArea() const;
328
333 void updateMask();
334
339 virtual void paintEvent( TQPaintEvent* pe );
340
341private:
342 void init( int popupStyle );
343
344 WId window;
345 TQWidget *msgView;
346 TQBoxLayout *topLayout;
347 int hideDelay;
348 TQTimer *hideTimer;
349
350 TQLabel *ttlIcon;
351 TQLabel *ttl;
352 TQLabel *msg;
353
354 bool m_autoDelete;
355
356 /* @internal */
357 class Private;
358 Private *d;
359};
360
361#endif // KPASSIVEPOPUP_H
KPassivePopup
A dialog-like popup that displays messages without interupting the user.
Definition: kpassivepopup.h:67
KPassivePopup::hidden
void hidden(KPassivePopup *)
Emitted when the popup is hidden.
KPassivePopup::timeout
int timeout() const
Returns the delay before the popup is removed automatically.
Definition: kpassivepopup.h:157
KPassivePopup::autoDelete
bool autoDelete() const
Definition: kpassivepopup.h:171
KPassivePopup::view
TQWidget * view() const
Returns the main view.
Definition: kpassivepopup.h:152
KPassivePopup::PopupStyle
PopupStyle
Styles that a KPassivePopup can have.
Definition: kpassivepopup.h:78
KPassivePopup::Boxed
@ Boxed
Information will appear in a framed box (default)
Definition: kpassivepopup.h:79
KPassivePopup::Balloon
@ Balloon
Information will appear in a comic-alike balloon.
Definition: kpassivepopup.h:80
KPassivePopup::clicked
void clicked()
Emitted when the popup is clicked.
KPassivePopup::clicked
void clicked(TQPoint pos)
Emitted when the popup is clicked.

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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.