kdgantt

KDGanttSizingControl.cpp
1 /*
2  $Id$
3 */
4 /****************************************************************************
5  ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved.
6  **
7  ** This file is part of the KDGantt library.
8  **
9  ** This file may be distributed and/or modified under the terms of the
10  ** GNU General Public License version 2 as published by the Free Software
11  ** Foundation and appearing in the file LICENSE.GPL included in the
12  ** packaging of this file.
13  **
14  ** Licensees holding valid commercial KDGantt licenses may use this file in
15  ** accordance with the KDGantt Commercial License Agreement provided with
16  ** the Software.
17  **
18  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
19  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20  **
21  ** See http://www.klaralvdalens-datakonsult.se/Public/products/ for
22  ** information about KDGantt Commercial License Agreements.
23  **
24  ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
25  ** licensing are not clear to you.
26  **
27  ** As a special exception, permission is given to link this program
28  ** with any edition of TQt, and distribute the resulting executable,
29  ** without including the source code for TQt in the source distribution.
30  **
31  **********************************************************************/
32 
33 
34 #include "KDGanttSizingControl.h"
35 
59 KDGanttSizingControl::KDGanttSizingControl( TQWidget* parent, const char* name, WFlags f )
60  :TQWidget( parent, name, f ), _isMinimized( false )
61 {
62 }
63 
64 
73 void KDGanttSizingControl::restore( bool restore )
74 {
75  _isMinimized = !restore;
76  if ( restore )
77  emit restored( this );
78  else
79  emit minimized( this );
80 }
81 
82 
83 
84 
94 void KDGanttSizingControl::minimize( bool minimize )
95 {
96  _isMinimized = minimize;
97  if ( minimize )
98  emit minimized( this );
99  else
100  emit restored( this );
101 }
102 
103 
109 {
110  return _isMinimized;
111 }
112 
118 {
119  restore(_isMinimized);
120 }
121 
122 
148 #ifndef KDGANTT_MASTER_CVS
149 #include "KDGanttSizingControl.moc"
150 #endif
virtual void minimize(bool minimize)
virtual void restore(bool restore)
void restored(KDGanttSizingControl *)
KDGanttSizingControl(TQWidget *parent=0, const char *name=0, WFlags f=0)
void minimized(KDGanttSizingControl *)