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

tdeui

  • tdeui
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
28class TQDragObject;
37class TDEUI_EXPORT KPushButton : public TQPushButton
38{
39 TQ_OBJECT
40 TQ_PROPERTY(int stdItem READ guiItm WRITE setGuiItm )
41 TQ_PROPERTY(bool isDragEnabled READ isDragEnabled WRITE setDragEnabled)
42
43public:
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
114protected:
120 virtual TQDragObject * dragObject();
121
125 virtual void mousePressEvent( TQMouseEvent * );
129 virtual void mouseMoveEvent( TQMouseEvent * );
130
134 virtual void startDrag();
135
136private:
137 bool m_dragEnabled;
138 TQPoint startPos;
139
140private slots:
141 void slotSettingsChanged( int category );
142
143private:
148 void init( const KGuiItem &item );
149
150 void readSettings();
151 static bool s_useIcons;
152
153protected:
154 virtual void virtual_hook( int id, void* data );
155private:
156 class KPushButtonPrivate;
157 KPushButtonPrivate *d;
158
159};
160
161#endif // KPUSHBUTTON_H
KGuiItem
An abstract class for GUI data such as ToolTip and Icon.
Definition: kguiitem.h:39
KPushButton
This is nothing but a TQPushButton with drag-support and KGuiItem support.
Definition: kpushbutton.h:38
KPushButton::isDragEnabled
bool isDragEnabled() const
Definition: kpushbutton.h:80
KStdGuiItem::StdItem
StdItem
Definition: kstdguiitem.h:48

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.