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

kdeui

  • kdeui
kpushbutton.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef KPUSHBUTTON_H
21 #define KPUSHBUTTON_H
22 
23 #include <tqpoint.h>
24 #include <tqpushbutton.h>
25 #include <kguiitem.h>
26 #include <kstdguiitem.h>
27 
28 class TQDragObject;
37 class KDEUI_EXPORT KPushButton : public TQPushButton
38 {
39  Q_OBJECT
40  Q_PROPERTY(int stdItem READ guiItm WRITE setGuiItm )
41  Q_PROPERTY(bool isDragEnabled READ isDragEnabled WRITE setDragEnabled)
42 
43 public:
44 
48  KPushButton( TQWidget *parent, const char *name=0 );
49 
53  KPushButton( const TQString &text, TQWidget *parent, const char *name=0);
54 
58  KPushButton( const TQIconSet &icon, const TQString &text,
59  TQWidget *parent, const char *name=0 );
60 
65  KPushButton( const KGuiItem &item, TQWidget *parent, const char *name = 0 );
66 
70  ~KPushButton();
71 
75  void setDragEnabled( bool enable );
76 
80  bool isDragEnabled() const { return m_dragEnabled; }
81 
85  void setGuiItem( const KGuiItem& item );
86 
91  void setGuiItem( KStdGuiItem::StdItem item );
92 
97  KStdGuiItem::StdItem guiItem() const;
98 
99  // Hack for Qt designer
100  void setGuiItm(int itm ) { setGuiItem( (KStdGuiItem::StdItem)itm );}
101  int guiItm() const { return (int)guiItem(); }
102 
107  void setIconSet( const TQIconSet &iconSet );
108 
112  void setText( const TQString &text );
113 
114 protected:
120  virtual TQDragObject * dragObject();
121 
125  virtual void mousePressEvent( TQMouseEvent * );
129  virtual void mouseMoveEvent( TQMouseEvent * );
130 
134  virtual void startDrag();
135 
136 private:
137  bool m_dragEnabled;
138  TQPoint startPos;
139 
140 private slots:
141  void slotSettingsChanged( int category );
142 
143 private:
148  void init( const KGuiItem &item );
149 
150  void readSettings();
151  static bool s_useIcons;
152 
153 protected:
154  virtual void virtual_hook( int id, void* data );
155 private:
156  class KPushButtonPrivate;
157  KPushButtonPrivate *d;
158 
159 };
160 
161 #endif // KPUSHBUTTON_H

kdeui

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

kdeui

Skip menu "kdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |