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 / kseparator.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  2.4 KB  |  88 lines

  1. /*
  2.  *   Copyright (C) 1997  Michael Roth <mroth@wirlweb.de>
  3.  *
  4.  *   This program is free software; you can redistribute it and/or modify
  5.  *   it under the terms of the GNU Library General Public License as published by
  6.  *   the Free Software Foundation; either version 2 of the License, or
  7.  *   (at your option) any later version.
  8.  *
  9.  *   This program 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
  12.  *   GNU 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 program; if not, write to the Free Software
  16.  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  17.  *
  18.  */
  19.  
  20. #ifndef __KSEPARATOR_H__
  21. #define __KSEPARATOR_H__
  22.  
  23. #include <qframe.h>
  24.  
  25. #include <kdelibs_export.h>
  26.  
  27. /**
  28.  * Standard horizontal or vertical separator.
  29.  *
  30.  * @author Michael Roth <mroth@wirlweb.de>
  31.  * @version $Id: kseparator.h 465272 2005-09-29 09:47:40Z mueller $
  32. */
  33. class KDEUI_EXPORT KSeparator : public QFrame
  34. {
  35.   Q_OBJECT
  36.   Q_PROPERTY( int orientation READ orientation WRITE setOrientation )
  37.  public:
  38.   /**
  39.    * Constructor.
  40.    * @param parent parent object.
  41.    * @param name name of the new object.
  42.    * @param f extra QWidget flags.
  43.    **/
  44.   KSeparator(QWidget* parent=0, const char* name=0, WFlags f=0);
  45.  
  46.   /**
  47.    * Constructor.
  48.    * @param orientation Set the orientation of the separator.
  49.    * Possible values are HLine or Horizontal and VLine or Vertical.
  50.    * @param parent parent object.
  51.    * @param name name of the new object.
  52.    * @param f extra QWidget flags.
  53.    **/
  54.   KSeparator(int orientation, QWidget* parent=0, const char* name=0, 
  55.          WFlags f=0);
  56.   
  57.   /**
  58.    * Returns the orientation of the separator.
  59.    * @return int Possible values are VLine and HLine.
  60.    **/
  61.   int orientation() const;
  62.   
  63.   /**
  64.    * Set the orientation of the separator to @p orient
  65.    *
  66.    * @param orient Possible values are VLine and HLine.
  67.    */
  68.   void setOrientation(int orient);
  69.   
  70.   /**
  71.    * The recommended height (width) for a horizontal (vertical) separator.
  72.    **/
  73.   virtual QSize sizeHint() const;
  74.  
  75. protected:
  76.   /**
  77.    * @param p pointer to painter
  78.    */
  79.   virtual void drawFrame( QPainter *p );
  80. protected:
  81.   virtual void virtual_hook( int id, void* data );
  82. private:
  83.   class KSeparatorPrivate* d;
  84. };
  85.  
  86.  
  87. #endif // __KSEPARATOR_H__
  88.