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

tdeui

  • tdeui
tdetoolbarbutton.h
1/* This file is part of the KDE libraries
2 Copyright (C) 1997, 1998 Stephan Kulow (coolo@kde.org)
3 (C) 1997, 1998 Sven Radej (radej@kde.org)
4 (C) 1997, 1998 Mark Donohoe (donohoe@kde.org)
5 (C) 1997, 1998 Matthias Ettrich (ettrich@kde.org)
6 (C) 2000 Kurt Granroth (granroth@kde.org)
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public
10 License version 2 as published by the Free Software Foundation.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22
23#ifndef _TDETOOLBARBUTTON_H
24#define _TDETOOLBARBUTTON_H
25
26#include <tqpixmap.h>
27#include <tqtoolbutton.h>
28#include <tqintdict.h>
29#include <tqstring.h>
30#include <tdeglobal.h>
31
32class TDEToolBar;
33class TDEToolBarButtonPrivate;
34class TDEInstance;
35class TQEvent;
36class TQPopupMenu;
37class TQPainter;
38
44class TDEUI_EXPORT TDEToolBarButton : public TQToolButton
45{
46 TQ_OBJECT
47
48
49public:
62 TDEToolBarButton(const TQString& icon, int id, TQWidget *parent,
63 const char *name=0L, const TQString &txt=TQString::null,
64 TDEInstance *_instance = TDEGlobal::instance());
65
77 TDEToolBarButton(const TQPixmap& pixmap, int id, TQWidget *parent,
78 const char *name=0L, const TQString &txt=TQString::null);
79
86 TDEToolBarButton(TQWidget *parent=0L, const char *name=0L);
87
91 ~TDEToolBarButton();
92
93#ifndef KDE_NO_COMPAT
103 // this one is from TQButton, so #ifdef-ing it out doesn't break BC
104 virtual void setPixmap(const TQPixmap &pixmap) TDE_DEPRECATED;
105
113 void setDefaultPixmap(const TQPixmap& pixmap) TDE_DEPRECATED;
114
122 void setDisabledPixmap(const TQPixmap& pixmap) TDE_DEPRECATED;
123#endif
124
131 virtual void setText(const TQString &text);
132
139 virtual void setIcon(const TQString &icon);
140
142 virtual void setIcon( const TQPixmap &pixmap )
143 { TQToolButton::setIcon( pixmap ); }
144
151 virtual void setIconSet( const TQIconSet &iconset );
152
153#ifndef KDE_NO_COMPAT
165 TDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); }
166
174 void setDefaultIcon(const TQString& icon) TDE_DEPRECATED;
175
183 void setDisabledIcon(const TQString& icon) TDE_DEPRECATED;
184#endif
185
191 void on(bool flag = true);
192
196 void toggle();
197
205 void setToggle(bool toggle = true);
206
210 TQPopupMenu *popup();
211
216 int id() const;
217
226 void setPopup (TQPopupMenu *p, bool unused = false);
227
238 void setDelayedPopup(TQPopupMenu *p, bool unused = false);
239
245 void setRadio(bool f = true);
246
254 void setNoStyle(bool no_style = true);
255
256signals:
260 void clicked(int);
267 void buttonClicked(int, TQt::ButtonState state);
268 void doubleClicked(int);
269 void pressed(int);
270 void released(int);
271 void toggled(int);
272 void highlighted(int, bool);
273
274public slots:
280 void modeChange();
281 virtual void setTextLabel(const TQString&, bool tipToo);
282
283protected:
284 bool event(TQEvent *e);
285 void paletteChange(const TQPalette &);
286 void leaveEvent(TQEvent *e);
287 void enterEvent(TQEvent *e);
288 void drawButton(TQPainter *p);
289 bool eventFilter (TQObject *o, TQEvent *e);
291 void mousePressEvent( TQMouseEvent * );
293 void mouseReleaseEvent( TQMouseEvent * );
294 void showMenu();
295 TQSize sizeHint() const;
296 TQSize minimumSizeHint() const;
297 TQSize minimumSize() const;
298
300 bool isRaised() const;
302 bool isActive() const;
304 int iconTextMode() const;
305
306protected slots:
307 void slotClicked();
308 void slotPressed();
309 void slotReleased();
310 void slotToggled();
311 void slotDelayTimeout();
312
313protected:
314 virtual void virtual_hook( int id, void* data );
315private:
316 TDEToolBarButtonPrivate *d;
317};
318
324class TDEUI_EXPORT TDEToolBarButtonList : public TQIntDict<TDEToolBarButton>
325{
326public:
327 TDEToolBarButtonList();
328 ~TDEToolBarButtonList() {}
329};
330
331#endif
TDEGlobal::instance
static TDEInstance * instance()
TDEInstance
TDEToolBarButtonList
List of TDEToolBarButton objects.
Definition: tdetoolbarbutton.h:325
TDEToolBarButton
A toolbar button.
Definition: tdetoolbarbutton.h:45
TDEToolBarButton::setIcon
TDE_DEPRECATED void setIcon(const TQString &icon, bool generate)
Definition: tdetoolbarbutton.h:165
TDEToolBarButton::setIcon
virtual void setIcon(const TQPixmap &pixmap)
Definition: tdetoolbarbutton.h:142
TDEToolBarButton::buttonClicked
void buttonClicked(int, TQt::ButtonState state)
Emitted when the toolbar button is clicked (with any mouse button)
TDEToolBarButton::clicked
void clicked(int)
Emitted when the toolbar button is clicked (with LMB or MMB)
TDEToolBar
Floatable toolbar with auto resize.
Definition: tdetoolbar.h:105

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.