home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ktoolbarradiogroup.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  2.7 KB  |  89 lines

  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.  
  7.     This library is free software; you can redistribute it and/or
  8.     modify it under the terms of the GNU Library General Public
  9.     License version 2 as published by the Free Software Foundation.
  10.  
  11.     This library is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.     Library General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU Library General Public License
  17.     along with this library; see the file COPYING.LIB.  If not, write to
  18.     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  19.     Boston, MA 02110-1301, USA.
  20.     */
  21.  
  22. #ifndef _KTOOLBARRADIOGROUP_H
  23. #define _KTOOLBARRADIOGROUP_H
  24.  
  25. #include <qobject.h>
  26.  
  27. #include <kdelibs_export.h>
  28.  
  29. class KToolBar;
  30. class KToolBarButtonList;
  31. class KToolBarRadioGroupPrivate;
  32.  
  33. /*************************************************************************
  34.  *                          KToolBarRadioGroup                                  *
  35.  *************************************************************************/
  36.  /**
  37.   * @short Class for group of radio butons in toolbar.
  38.   *
  39.   * KToolBarRadioGroup is class for group of radio butons in toolbar.
  40.   * Take toggle buttons which you already inserted into toolbar,
  41.   * create KToolBarRadioGroup instance and add them here.
  42.   * All buttons will emit signals toggled (bool) (or you can
  43.   * use sitgnal toggled (int id) from toolbar). When one button is set
  44.   * down, all others are unset. All buttons emit signals - those who
  45.   * "go down" and those who "go up".
  46.   *
  47.   * @author Sven Radej <radej@kde.org>
  48.   */
  49. class KDEUI_EXPORT KToolBarRadioGroup : public QObject
  50. {
  51.   Q_OBJECT
  52.  
  53. public:
  54.   /**
  55.    * Constructor. Parent must be KToolBar .
  56.    */
  57.   KToolBarRadioGroup (KToolBar *_parent, const char *_name=0);
  58.   /**
  59.    * Destructor.
  60.    */
  61.   ~KToolBarRadioGroup ();
  62.  
  63.   /**
  64.    * Adds button to group. Button cannot be unset by mouse clicks (you
  65.    * must press some other button tounset this one)
  66.    */
  67.   void addButton (int id);
  68.  
  69.   /**
  70.    * Removes button from group, making it again toggle button (i.e.
  71.    * You can unset it with mouse).
  72.    */
  73.   void removeButton (int id);
  74.  
  75. public slots:
  76.   /**
  77.    * Internal - nothing for you here.
  78.    */
  79.   void slotToggled (int);
  80.  
  81. private:
  82.   KToolBarButtonList *buttons;
  83.   KToolBar *tb;
  84.  
  85.   KToolBarRadioGroupPrivate *d;
  86. };
  87.  
  88. #endif
  89.