• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

kseparator.cpp

Go to the documentation of this file.
00001 /*
00002  *   Copyright (C) 1997  Michael Roth <mroth@wirlweb.de>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as published by
00006  *   the Free Software Foundation; either version 2 of the License, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU Library General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU Library General Public License
00015  *   along with this program; if not, write to the Free Software
00016  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00017  *
00018  */
00019 
00020 #include "kseparator.h"
00021 #include <QStyle>
00022 #include <QStyleOption>
00023 #include <QPainter>
00024 
00025 KSeparator::KSeparator(QWidget* parent, Qt::WFlags f) : QFrame(parent, f)
00026 {
00027    setLineWidth(1);
00028    setMidLineWidth(0);
00029    setOrientation( Qt::Horizontal );
00030 }
00031 
00032 
00033 KSeparator::KSeparator(Qt::Orientation orientation, QWidget* parent, Qt::WFlags f)
00034    : QFrame(parent, f)
00035 {
00036    setLineWidth(1);
00037    setMidLineWidth(0);
00038    setOrientation( orientation );
00039 }
00040 
00041 
00042 void KSeparator::setOrientation(Qt::Orientation orientation)
00043 {
00044    if (orientation == Qt::Vertical) {
00045       setFrameShape ( QFrame::VLine );
00046       setFrameShadow( QFrame::Sunken );
00047       setMinimumSize(2, 0);
00048    }
00049    else {
00050       setFrameShape ( QFrame::HLine );
00051       setFrameShadow( QFrame::Sunken );
00052       setMinimumSize(0, 2);
00053    }
00054 }
00055 
00056 Qt::Orientation KSeparator::orientation() const
00057 {
00058    return ( frameStyle() & VLine ) ? Qt::Vertical : Qt::Horizontal;
00059 }
00060 
00061 #include "kseparator.moc"

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal