kdgantt

KDGanttSemiSizingControl.h
1 /*
2  $Id$
3 */
4 
5 /****************************************************************************
6  ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved.
7  **
8  ** This file is part of the KDGantt library.
9  **
10  ** This file may be distributed and/or modified under the terms of the
11  ** GNU General Public License version 2 as published by the Free Software
12  ** Foundation and appearing in the file LICENSE.GPL included in the
13  ** packaging of this file.
14  **
15  ** Licensees holding valid commercial KDGantt licenses may use this file in
16  ** accordance with the KDGantt Commercial License Agreement provided with
17  ** the Software.
18  **
19  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21  **
22  ** See http://www.klaralvdalens-datakonsult.se/Public/products/ for
23  ** information about KDGantt Commercial License Agreements.
24  **
25  ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
26  ** licensing are not clear to you.
27  **
28  ** As a special exception, permission is given to link this program
29  ** with any edition of TQt, and distribute the resulting executable,
30  ** without including the source code for TQt in the source distribution.
31  **
32  **********************************************************************/
33 
34 
35 #ifndef KDGANTTSEMISIZINGCONTROL_H
36 #define KDGANTTSEMISIZINGCONTROL_H
37 
38 #include "KDGanttSizingControl.h"
39 #include <tqlayout.h>
40 class TQPushButton;
41 class TQBoxLayout;
42 
44 {
46  TQ_ENUMS( ArrowPosition )
47  TQ_OBJECT
48 
49 
50 public:
51  enum ArrowPosition { Before, After };
52 
53  KDGanttSemiSizingControl( TQWidget* parent = 0, const char* name = 0 );
54  KDGanttSemiSizingControl( TQt::Orientation orientation, TQWidget* parent = 0,
55  const char* name = 0 );
57  TQt::Orientation orientation, TQWidget* parent = 0,
58  const char* name = 0 );
59 
60  void setMinimizedWidget( TQWidget* widget );
61  void setMaximizedWidget( TQWidget* widget );
62  TQWidget* minimizedWidget() const;
63  TQWidget* maximizedWidget() const;
64 
65  void setOrientation( TQt::Orientation orientation );
66  TQt::Orientation orientation() const;
67 
70 
71 public slots:
72  virtual void minimize( bool minimize );
73  virtual void restore( bool restore );
74 
75 protected:
76  void setup();
77  void init();
78  enum Direction {Left, Right, Up, Down };
79  TQPixmap pixmap( Direction );
80 
81 private:
82  TQt::Orientation _orient;
83  ArrowPosition _arrowPos;
84  TQWidget* _minimizedWidget;
85  TQWidget* _maximizedWidget;
86  TQBoxLayout* _layout;
87  TQPushButton* _but;
88 };
89 
90 
91 #endif
virtual void restore(bool restore)
TQt::Orientation orientation() const
void setArrowPosition(ArrowPosition arrowPosition)
KDGanttSemiSizingControl(TQWidget *parent=0, const char *name=0)
void setOrientation(TQt::Orientation orientation)
void setMaximizedWidget(TQWidget *widget)
virtual void minimize(bool minimize)
void setMinimizedWidget(TQWidget *widget)