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

tdeui

  • tdeui
kpanelextension.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 __kpanelextension_h__
25#define __kpanelextension_h__
26
27#include <tqframe.h>
28#include <tdelibs_export.h>
29
30class TQPopupMenu;
31class TDEConfig;
32class KPanelExtensionPrivate;
33
97class TDEUI_EXPORT KPanelExtension : public TQFrame
98{
99 TQ_OBJECT
100
101public:
102
104 enum Type { Normal = 0, Stretch };
105 // KDE4: Merge these with KPanelApplet's enums
107 enum Action { About = 1, Help = 2, Preferences = 4, ReportBug = 8 };
108 enum Position { Left = 0, Right, Top, Bottom, Floating };
109 enum Alignment { LeftTop = 0, Center, RightBottom };
111 enum Size { SizeTiny = 0, SizeSmall, SizeNormal, SizeLarge, SizeCustom };
112
122 KPanelExtension(const TQString& configFile, Type t = Normal,
123 int actions = 0, TQWidget *parent = 0, const char *name = 0);
124
128 ~KPanelExtension();
129
139 virtual TQSize sizeHint(Position /*p*/, TQSize maxsize) const { return maxsize; }
140
150 TDEConfig* config() const { return _config; }
151
156 Type type() const { return _type; }
157
162 int actions() const { return _actions; }
163
174 virtual void action( Action a );
175
176
183 virtual Position preferedPosition() const { return Bottom; }
184
188 void setPosition( Position p );
192 void setAlignment( Alignment a );
197 void setSize( Size size, int customSize );
198
203 Size sizeSetting() const;
204
209 int customSize() const;
210
216 TQPopupMenu* customMenu() const;
217
224 bool reserveStrut() const;
225
226signals:
232 void updateLayout();
233
238 void maintainFocus(bool);
239
240protected:
241
249 virtual void about() {}
250
258 virtual void help() {}
259
267 virtual void preferences() {}
268
277 virtual void reportBug() {}
278
282 Position position() const { return _position; }
283
287 Alignment alignment() const { return _alignment; }
288
292 Orientation orientation();
293
298 int sizeInPixels() const;
299
305 virtual void positionChange( Position ) {}
306
312 virtual void alignmentChange( Alignment ) {}
313
324 void setCustomMenu(TQPopupMenu*);
325
331 void setReserveStrut(bool shouldUseStrut);
332
333private:
334 Type _type;
335 Position _position;
336 Alignment _alignment;
337 TDEConfig* _config;
338 int _actions;
339protected:
340 virtual void virtual_hook( int id, void* data );
341private:
342 KPanelExtensionPrivate *d;
343};
344
345#endif
KPanelExtension
TDE Panel Extension class
Definition: kpanelextension.h:98
KPanelExtension::preferences
virtual void preferences()
Is called when the user selects "Preferences" from the extensions RMB menu.
Definition: kpanelextension.h:267
KPanelExtension::updateLayout
void updateLayout()
Emit this signal to make the panel relayout all extensions in the dock, when you want to change the e...
KPanelExtension::actions
int actions() const
Definition: kpanelextension.h:162
KPanelExtension::help
virtual void help()
Is called when the user selects "Help" from the extensions RMB menu.
Definition: kpanelextension.h:258
KPanelExtension::Size
Size
Definition: kpanelextension.h:111
KPanelExtension::preferedPosition
virtual Position preferedPosition() const
Reimplement this function to set a preferred dock position for your extension.
Definition: kpanelextension.h:183
KPanelExtension::position
Position position() const
Definition: kpanelextension.h:282
KPanelExtension::alignmentChange
virtual void alignmentChange(Alignment)
This extension has changed its alignment.
Definition: kpanelextension.h:312
KPanelExtension::Type
Type
The type of the extension (TODO)
Definition: kpanelextension.h:104
KPanelExtension::positionChange
virtual void positionChange(Position)
This extension has changed its position.
Definition: kpanelextension.h:305
KPanelExtension::alignment
Alignment alignment() const
Definition: kpanelextension.h:287
KPanelExtension::maintainFocus
void maintainFocus(bool)
Emit this signal to make the panel maintain focus, e.g.
KPanelExtension::Action
Action
An action to be taken sometime.
Definition: kpanelextension.h:107
KPanelExtension::about
virtual void about()
Is called when the user selects "About" from the extensions RMB menu.
Definition: kpanelextension.h:249
KPanelExtension::config
TDEConfig * config() const
Always use this TDEConfig object to save/load your extensions configuration.
Definition: kpanelextension.h:150
KPanelExtension::sizeHint
virtual TQSize sizeHint(Position, TQSize maxsize) const
Returns the preferred size for a given Position.
Definition: kpanelextension.h:139
KPanelExtension::reportBug
virtual void reportBug()
Is called when the user selects "Report bug" from the applet's RMB menu.
Definition: kpanelextension.h:277
KPanelExtension::type
Type type() const
Definition: kpanelextension.h:156
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.