24 #ifndef __kpanelapplet_h__
25 #define __kpanelapplet_h__
28 #include <tdeconfig.h>
106 enum Type { Normal = 0, Stretch };
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 };
127 KPanelApplet(
const TQString& configFile, Type t = Normal,
128 int actions = 0, TQWidget *parent = 0,
const char *name = 0,
155 virtual int widthForHeight(
int height)
const {
return height; }
176 virtual int heightForWidth(
int width)
const {
return width; }
187 TDEConfig* config()
const {
return _config; }
188 TDESharedConfig::Ptr sharedConfig()
const;
194 Type type()
const {
return _type; }
200 int actions()
const {
return _actions; }
212 virtual void action( Action a );
218 const TQPopupMenu* customMenu()
const;
223 void setPosition( Position p );
227 void setAlignment( Alignment a );
261 void requestFocus(
bool focus);
272 virtual void about() {}
281 virtual void help() {}
305 Orientation orientation()
const;
309 Position position()
const {
return _position; }
313 Alignment alignment()
const {
return _alignment; }
320 virtual void positionChange( Position p );
327 virtual void alignmentChange( Alignment ) {}
338 void setCustomMenu(
const TQPopupMenu*);
347 void watchForFocus(TQWidget* widget,
bool watch =
true);
355 void needsFocus(
bool focus);
364 virtual KDE_DEPRECATED
void orientationChange( Orientation ) {}
370 Direction popupDirection();
379 virtual KDE_DEPRECATED
void popupDirectionChange( Direction ) {}
381 bool eventFilter(TQObject *, TQEvent *);
386 Alignment _alignment;
390 virtual void virtual_hook(
int id,
void* data );
391 class KPanelAppletPrivate;
392 KPanelAppletPrivate *d;
TDEAction * preferences(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name)
Display the preferences/options dialog.
const TDEShortcut & help()
Action
This enum holds flags which can be ORed together to describe which items the context menu over the ap...
TDEAction * reportBug(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name)
Open up the Report Bug dialog.
TQString action(StdAccel id)