• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDE3Support

  • kde3support
  • kdeui
k3panelapplet.h
Go to the documentation of this file.
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 <kde3support_export.h>
28#include <QtGui/QFrame>
29
30#include <ksharedconfig.h>
31
32class QMenu;
33
98class KDE3SUPPORT_EXPORT K3PanelApplet : public QFrame
99{
100 Q_OBJECT
101
102public:
103 enum Type { Normal = 0, Stretch };
104 enum Action { About = 1, Help = 2, Preferences = 4, ReportBug = 8 };
105 enum Position { Left = 0, Right, Up, Down, Top = Up, Bottom = Down, Floating };
106 enum Alignment { LeftTop = 0, Center, RightBottom };
107
117 explicit K3PanelApplet(const QString& configFile, Type t = Normal,
118 int actions = 0, QWidget *parent = 0, Qt::WindowFlags f = 0);
119
123 ~K3PanelApplet();
124
144 virtual int widthForHeight(int height) const { return height; }
145
165 virtual int heightForWidth(int width) const { return width; }
166
176 KConfig* config() const;
177 KSharedConfig::Ptr sharedConfig() const;
178
183 Type type() const;
184
189 int actions() const;
190
201 virtual void action( Action a );
202
207 const QMenu* customMenu() const;
208
212 void setPosition( Position p );
216 void setAlignment( Alignment a );
217
218Q_SIGNALS:
233 void updateLayout();
234
239 void requestFocus();
240
249 void requestFocus(bool focus);
250
251protected:
252
260 virtual void about() {}
261
269 virtual void help() {}
270
278 virtual void preferences() {}
279
288 virtual void reportBug() {}
289
293 Qt::Orientation orientation() const;
297 Position position() const;
301 Alignment alignment() const;
302
308 virtual void positionChange( Position p );
309
315 virtual void alignmentChange( Alignment /*a*/ ) {}
316
326 void setCustomMenu(const QMenu*);
327
334 void watchForFocus(QWidget* widget, bool watch = true);
335
341 void needsFocus(bool focus);
342
349 // FIXME: Remove for KDE 4
350 virtual KDE_DEPRECATED void orientationChange( Qt::Orientation /* orientation*/) {}
351
356 Position popupDirection();
357
364 // FIXME: Remove for KDE 4
365 virtual KDE_DEPRECATED void popupDirectionChange( Position /*direction*/ ) {}
366
367 bool eventFilter(QObject *, QEvent *);
368
369protected:
370 class Private;
371 Private *d;
372};
373
374#endif
K3PanelApplet
KDE Panel Applet class
Definition: k3panelapplet.h:99
K3PanelApplet::d
Private * d
Definition: k3panelapplet.h:371
K3PanelApplet::updateLayout
void updateLayout()
Emit this signal to make the panel relayout all applets, when you want to change your width (horizont...
K3PanelApplet::requestFocus
void requestFocus(bool focus)
Request keyboard focus from the panel.
K3PanelApplet::requestFocus
void requestFocus()
Request keyboard focus from the panel.
K3PanelApplet::Type
Type
Definition: k3panelapplet.h:103
K3PanelApplet::Alignment
Alignment
Definition: k3panelapplet.h:106
K3PanelApplet::reportBug
virtual void reportBug()
Is called when the user selects "Report bug" from the applet's RMB menu.
Definition: k3panelapplet.h:288
K3PanelApplet::orientationChange
virtual void orientationChange(Qt::Orientation)
The orientation changed to orientation.
Definition: k3panelapplet.h:350
K3PanelApplet::popupDirectionChange
virtual void popupDirectionChange(Position)
The popup direction changed to direction.
Definition: k3panelapplet.h:365
K3PanelApplet::alignmentChange
virtual void alignmentChange(Alignment)
The panel on which this applet resides has changed its alignment.
Definition: k3panelapplet.h:315
K3PanelApplet::preferences
virtual void preferences()
Is called when the user selects "Preferences" from the applet's RMB menu.
Definition: k3panelapplet.h:278
K3PanelApplet::help
virtual void help()
Is called when the user selects "Help" from the applet's RMB menu.
Definition: k3panelapplet.h:269
K3PanelApplet::about
virtual void about()
Is called when the user selects "About" from the applet's RMB menu.
Definition: k3panelapplet.h:260
K3PanelApplet::Position
Position
Definition: k3panelapplet.h:105
K3PanelApplet::heightForWidth
virtual int heightForWidth(int width) const
Definition: k3panelapplet.h:165
K3PanelApplet::widthForHeight
virtual int widthForHeight(int height) const
Returns a suggested width for a given height.
Definition: k3panelapplet.h:144
KConfig
KSharedPtr< KSharedConfig >
QEvent
QFrame
QMenu
QObject
QWidget
kde3support_export.h
ksharedconfig.h
Type
Type
config
KSharedConfigPtr config()
Help
Help
ReportBug
ReportBug
Preferences
Preferences
Up
Up
Action
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDE3Support

Skip menu "KDE3Support"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal