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

tdeui

  • tdeui
kpanelextension.h
1 /*****************************************************************
2 
3 Copyright (c) 2000 Matthias Elter
4 
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
11 
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14 
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION 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 
30 class TQPopupMenu;
31 class TDEConfig;
32 class KPanelExtensionPrivate;
33 
97 class TDEUI_EXPORT KPanelExtension : public TQFrame
98 {
99  Q_OBJECT
100 
101 public:
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 
226 signals:
232  void updateLayout();
233 
238  void maintainFocus(bool);
239 
240 protected:
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 
333 private:
334  Type _type;
335  Position _position;
336  Alignment _alignment;
337  TDEConfig* _config;
338  int _actions;
339 protected:
340  virtual void virtual_hook( int id, void* data );
341 private:
342  KPanelExtensionPrivate *d;
343 };
344 
345 #endif

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.1.2
This website is maintained by Timothy Pearson.