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

tdeui

  • tdeui
kpanelapplet.h
1/*****************************************************************
2
3Copyright (c) 2000 Matthias Elter
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22******************************************************************/
23
24#ifndef __kpanelapplet_h__
25#define __kpanelapplet_h__
26
27#include <tqframe.h>
28#include <tdeconfig.h>
29
30class TDEConfig;
31class TQPopupMenu;
32
97class TDEUI_EXPORT KPanelApplet : public TQFrame
98{
99 TQ_OBJECT
100
101public:
102
106 enum Type { Normal = 0, Stretch };
111 // KDE4: Merge these with KPanelExtension's enums
112 enum Action { About = 1, Help = 2, Preferences = 4, ReportBug = 8 };
113 enum Position { pLeft = 0, pRight, pTop, pBottom };
114 enum Alignment { LeftTop = 0, Center, RightBottom };
115 enum Direction { Up = 0, Down, Left, Right };
116
127 KPanelApplet(const TQString& configFile, Type t = Normal,
128 int actions = 0, TQWidget *parent = 0, const char *name = 0,
129 WFlags f = 0);
130
134 ~KPanelApplet();
135
155 virtual int widthForHeight(int height) const { return height; }
156
176 virtual int heightForWidth(int width) const { return width; }
177
187 TDEConfig* config() const { return _config; }
188 TDESharedConfig::Ptr sharedConfig() const;
189
194 Type type() const { return _type; }
195
200 int actions() const { return _actions; }
201
212 virtual void action( Action a );
213
218 const TQPopupMenu* customMenu() const;
219
223 void setPosition( Position p );
227 void setAlignment( Alignment a );
228
229signals:
244 void updateLayout();
245
250 void requestFocus();
251
261 void requestFocus(bool focus);
262
263protected:
264
272 virtual void about() {}
273
281 virtual void help() {}
282
290 virtual void preferences() {}
291
300 virtual void reportBug() {}
301
305 Orientation orientation() const;
309 Position position() const { return _position; }
313 Alignment alignment() const { return _alignment; }
314
320 virtual void positionChange( Position p );
321
327 virtual void alignmentChange( Alignment /*a*/ ) {}
328
338 void setCustomMenu(const TQPopupMenu*);
339
347 void watchForFocus(TQWidget* widget, bool watch = true);
348
355 void needsFocus(bool focus);
356
363 // FIXME: Remove for KDE 4
364 virtual TDE_DEPRECATED void orientationChange( Orientation /* orientation*/) {}
365
370 Direction popupDirection();
371
378 // FIXME: Remove for KDE 4
379 virtual TDE_DEPRECATED void popupDirectionChange( Direction /*direction*/ ) {}
380
381 bool eventFilter(TQObject *, TQEvent *);
382
383private:
384 Type _type;
385 Position _position;
386 Alignment _alignment;
387 TDEConfig* _config;
388 int _actions;
389protected:
390 virtual void virtual_hook( int id, void* data );
391 class KPanelAppletPrivate;
392 KPanelAppletPrivate *d;
393};
394
395#endif
KPanelApplet
TDE Panel Applet class
Definition: kpanelapplet.h:98
KPanelApplet::actions
int actions() const
Definition: kpanelapplet.h:200
KPanelApplet::reportBug
virtual void reportBug()
Is called when the user selects "Report bug" from the applet's RMB menu.
Definition: kpanelapplet.h:300
KPanelApplet::Type
Type
This enum describes the type of the applet.
Definition: kpanelapplet.h:106
KPanelApplet::preferences
virtual void preferences()
Is called when the user selects "Preferences" from the applet's RMB menu.
Definition: kpanelapplet.h:290
KPanelApplet::alignmentChange
virtual void alignmentChange(Alignment)
The panel on which this applet resides has changed its alignment.
Definition: kpanelapplet.h:327
KPanelApplet::heightForWidth
virtual int heightForWidth(int width) const
Definition: kpanelapplet.h:176
KPanelApplet::Action
Action
This enum holds flags which can be ORed together to describe which items the context menu over the ap...
Definition: kpanelapplet.h:112
KPanelApplet::updateLayout
void updateLayout()
Emit this signal to make the panel relayout all applets, when you want to change your width (horizont...
KPanelApplet::alignment
Alignment alignment() const
Definition: kpanelapplet.h:313
KPanelApplet::config
TDEConfig * config() const
Always use this TDEConfig object to save/load your applet's configuration.
Definition: kpanelapplet.h:187
KPanelApplet::position
Position position() const
Definition: kpanelapplet.h:309
KPanelApplet::widthForHeight
virtual int widthForHeight(int height) const
Returns a suggested width for a given height.
Definition: kpanelapplet.h:155
KPanelApplet::orientationChange
virtual TDE_DEPRECATED void orientationChange(Orientation)
The orientation changed to orientation.
Definition: kpanelapplet.h:364
KPanelApplet::help
virtual void help()
Is called when the user selects "Help" from the applet's RMB menu.
Definition: kpanelapplet.h:281
KPanelApplet::requestFocus
void requestFocus()
Request keyboard focus from the panel.
KPanelApplet::requestFocus
void requestFocus(bool focus)
Request keyboard focus from the panel.
KPanelApplet::popupDirectionChange
virtual TDE_DEPRECATED void popupDirectionChange(Direction)
The popup direction changed to direction.
Definition: kpanelapplet.h:379
KPanelApplet::type
Type type() const
Definition: kpanelapplet.h:194
KPanelApplet::about
virtual void about()
Is called when the user selects "About" from the applet's RMB menu.
Definition: kpanelapplet.h:272
TDEConfig

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.