• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDE3Support

k3panelapplet.h

Go to the documentation of this file.
00001 /*****************************************************************
00002 
00003 Copyright (c) 2000 Matthias Elter
00004 
00005 Permission is hereby granted, free of charge, to any person obtaining a copy
00006 of this software and associated documentation files (the "Software"), to deal
00007 in the Software without restriction, including without limitation the rights
00008 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00009 copies of the Software, and to permit persons to whom the Software is
00010 furnished to do so, subject to the following conditions:
00011 
00012 The above copyright notice and this permission notice shall be included in
00013 all copies or substantial portions of the Software.
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00018 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00019 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00020 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00021 
00022 ******************************************************************/
00023 
00024 #ifndef __kpanelapplet_h__
00025 #define __kpanelapplet_h__
00026 
00027 #include <kde3support_export.h>
00028 #include <QtGui/QFrame>
00029 
00030 #include <ksharedconfig.h>
00031 
00032 class QMenu;
00033 
00098 class KDE3SUPPORT_EXPORT K3PanelApplet : public QFrame
00099 {
00100     Q_OBJECT
00101 
00102 public:
00103     enum Type { Normal = 0, Stretch };
00104     enum Action { About = 1, Help = 2, Preferences = 4, ReportBug = 8 };
00105     enum Position { Left = 0, Right, Up, Down, Top = Up, Bottom = Down, Floating };
00106     enum Alignment { LeftTop = 0, Center, RightBottom };
00107 
00117     explicit K3PanelApplet(const QString& configFile, Type t = Normal,
00118                           int actions = 0, QWidget *parent = 0, Qt::WFlags f = 0);
00119 
00123     ~K3PanelApplet();
00124 
00144     virtual int widthForHeight(int height) const { return height; }
00145 
00165     virtual int heightForWidth(int width) const { return width; }
00166 
00176     KConfig* config() const;
00177     KSharedConfig::Ptr sharedConfig() const;
00178 
00183     Type type() const;
00184 
00189     int actions() const;
00190 
00201     virtual void action( Action a );
00202 
00207     const QMenu* customMenu() const;
00208 
00212     void setPosition( Position p );
00216     void setAlignment( Alignment a );
00217 
00218 Q_SIGNALS:
00233     void updateLayout();
00234 
00239     void requestFocus();
00240 
00249     void requestFocus(bool focus);
00250 
00251 protected:
00252 
00260     virtual void about() {}
00261 
00269     virtual void help() {}
00270 
00278     virtual void preferences() {}
00279 
00288    virtual void reportBug() {}
00289 
00293     Qt::Orientation orientation() const;
00297     Position position() const;
00301     Alignment alignment() const;
00302 
00308     virtual void positionChange( Position p );
00309 
00315     virtual void alignmentChange( Alignment /*a*/ ) {}
00316 
00326     void setCustomMenu(const QMenu*);
00327 
00334     void watchForFocus(QWidget* widget, bool watch = true);
00335 
00341     void needsFocus(bool focus);
00342 
00349     // FIXME: Remove for KDE 4
00350     virtual KDE_DEPRECATED void orientationChange( Qt::Orientation /* orientation*/) {}
00351 
00356     Position popupDirection();
00357 
00364     // FIXME: Remove for KDE 4
00365     virtual KDE_DEPRECATED void popupDirectionChange( Position /*direction*/ ) {}
00366 
00367     bool eventFilter(QObject *, QEvent *);
00368 
00369 protected:
00370     class Private;
00371     Private *d;
00372 };
00373 
00374 #endif

KDE3Support

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal