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

kdgantt1

KDGanttMinimizeSplitter Class Reference

#include <KDGanttMinimizeSplitter.h>

Inheritance diagram for KDGanttMinimizeSplitter:

Inheritance graph
[legend]

List of all members.


Detailed Description

The KDGanttMinimizeSplitter class implements a splitter widget with minimize buttons.

This class (and its documentation) is largely a copy of Qt's QSplitter; the copying was necessary because QSplitter is not extensible at all. QSplitter and its documentation are licensed according to the GPL and the Qt Professional License (if you hold such a license) and are (C) Trolltech AS.

A splitter lets the user control the size of child widgets by dragging the boundary between the children. Any number of widgets may be controlled.

To show a QListBox, a QListView and a QTextEdit side by side:

    KDGanttMinimizeSplitter *split = new KDGanttMinimizeSplitter( parent );
    QListBox *lb = new QListBox( split );
    QListView *lv = new QListView( split );
    QTextEdit *ed = new QTextEdit( split );

In KDGanttMinimizeSplitter, the boundary can be either horizontal or vertical. The default is horizontal (the children are side by side) but you can use setOrientation( QSplitter::Vertical ) to set it to vertical.

Use setResizeMode() to specify that a widget should keep its size when the splitter is resized.

Although KDGanttMinimizeSplitter normally resizes the children only at the end of a resize operation, if you call setOpaqueResize( TRUE ) the widgets are resized as often as possible.

The initial distribution of size between the widgets is determined by the initial size of each widget. You can also use setSizes() to set the sizes of all the widgets. The function sizes() returns the sizes set by the user.

If you hide() a child, its space will be distributed among the other children. It will be reinstated when you show() it again. It is also possible to reorder the widgets within the splitter using moveToFirst() and moveToLast().

Definition at line 51 of file KDGanttMinimizeSplitter.h.


Public Types

enum  Direction { Left, Right, Up, Down }
enum  ResizeMode { Stretch, KeepSize, FollowSizeHint }

Public Member Functions

 KDGanttMinimizeSplitter (Qt::Orientation, QWidget *parent=0, const char *name=0)
 KDGanttMinimizeSplitter (QWidget *parent=0, const char *name=0)
Direction minimizeDirection () const
Orientation orientation () const
void setMinimizeDirection (Direction)
virtual void setOrientation (Orientation)
 ~KDGanttMinimizeSplitter ()

Properties

Direction minimizeDirection
Orientation orientation

Member Enumeration Documentation

enum KDGanttMinimizeSplitter::Direction

The values of this enumeration describe into which direction the splitter will collapse its child widgets. By extension, it also specifies the orientation of the splitter; collapsing to the left or to the right results in a horizontal splitter, collapsing to the top or bottom in a vertical splitter.

Enumerator:
Left 
Right 
Up 
Down 

Definition at line 60 of file KDGanttMinimizeSplitter.h.

enum KDGanttMinimizeSplitter::ResizeMode

This enum type describes how KDGanttMinimizeSplitter will resize each of its child widgets. The currently defined values are:

Stretch: the widget will be resized when the splitter itself is resized.

KeepSize: KDGanttMinimizeSplitter will try to keep this widget's size unchanged.

FollowSizeHint: KDGanttMinimizeSplitter will resize the widget when the widget's size hint changes.

Enumerator:
Stretch 
KeepSize 
FollowSizeHint 

Definition at line 59 of file KDGanttMinimizeSplitter.h.


Constructor & Destructor Documentation

KDGanttMinimizeSplitter::KDGanttMinimizeSplitter ( QWidget *  parent = 0,
const char *  name = 0 
)

Constructs a horizontal splitter with the parent and name arguments being passed on to the QFrame constructor.

Definition at line 394 of file KDGanttMinimizeSplitter.cpp.

KDGanttMinimizeSplitter::KDGanttMinimizeSplitter ( Qt::Orientation  ,
QWidget *  parent = 0,
const char *  name = 0 
)

KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter (  ) 

Destroys the splitter and any children.

Definition at line 419 of file KDGanttMinimizeSplitter.cpp.


Member Function Documentation

Direction KDGanttMinimizeSplitter::minimizeDirection (  )  const

Orientation KDGanttMinimizeSplitter::orientation (  )  const [inline]

Definition at line 67 of file KDGanttMinimizeSplitter.h.

void KDGanttMinimizeSplitter::setMinimizeDirection ( Direction  direction  ) 

Specifies the direction of the minimize buttons. If the orientation of the splitter is horizontal then with KDGanttMinimizeSplitter::Left or KDGanttMinimizeSplitter::Right should be used, otherwise either KDGanttMinimizeSplitter::Up or KDGanttMinimizeSplitter::Down should be used.

Definition at line 1327 of file KDGanttMinimizeSplitter.cpp.

void KDGanttMinimizeSplitter::setOrientation ( Orientation  o  )  [virtual]

the orientation of the splitter

By default the orientation is horizontal (the widgets are side by side). The possible orientations are Qt:Vertical and Qt::Horizontal (the default).

Definition at line 447 of file KDGanttMinimizeSplitter.cpp.


Property Documentation

KDGanttMinimizeSplitter::Direction KDGanttMinimizeSplitter::minimizeDirection [read, write]

Returns the direction of the minimize buttons.

Definition at line 56 of file KDGanttMinimizeSplitter.h.

Orientation KDGanttMinimizeSplitter::orientation [read, write]

Returns the orientation of the splitter.

Definition at line 55 of file KDGanttMinimizeSplitter.h.


The documentation for this class was generated from the following files:
  • KDGanttMinimizeSplitter.h
  • KDGanttMinimizeSplitter.cpp

kdgantt1

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

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
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