kdgantt

KDGanttSizingControl.cpp

00001 /* -*- Mode: C++ -*-
00002    $Id$
00003 */
00004 /****************************************************************************
00005  ** Copyright (C)  2002-2004 Klarälvdalens Datakonsult AB.  All rights reserved.
00006  **
00007  ** This file is part of the KDGantt library.
00008  **
00009  ** This file may be distributed and/or modified under the terms of the
00010  ** GNU General Public License version 2 as published by the Free Software
00011  ** Foundation and appearing in the file LICENSE.GPL included in the
00012  ** packaging of this file.
00013  **
00014  ** Licensees holding valid commercial KDGantt licenses may use this file in
00015  ** accordance with the KDGantt Commercial License Agreement provided with
00016  ** the Software.
00017  **
00018  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00019  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00020  **
00021  ** See http://www.klaralvdalens-datakonsult.se/Public/products/ for
00022  **   information about KDGantt Commercial License Agreements.
00023  **
00024  ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
00025  ** licensing are not clear to you.
00026  **
00027  ** As a special exception, permission is given to link this program
00028  ** with any edition of Qt, and distribute the resulting executable,
00029  ** without including the source code for Qt in the source distribution.
00030  **
00031  **********************************************************************/
00032 
00033 
00034 #include "KDGanttSizingControl.h"
00035 
00059 KDGanttSizingControl::KDGanttSizingControl( QWidget* parent, const char* name, WFlags f )
00060     :QWidget( parent, name, f ), _isMinimized( false )
00061 {
00062 }
00063 
00064 
00073 void KDGanttSizingControl::restore( bool restore )
00074 {
00075     _isMinimized = !restore;
00076     if ( restore )
00077         emit restored( this );
00078     else
00079         emit minimized( this );
00080 }
00081 
00082 
00083 
00084 
00094 void KDGanttSizingControl::minimize( bool minimize )
00095 {
00096     _isMinimized = minimize;
00097     if ( minimize )
00098         emit minimized( this );
00099     else
00100         emit restored( this );
00101 }
00102 
00103 
00108 bool KDGanttSizingControl::isMinimized() const
00109 {
00110     return _isMinimized;
00111 }
00112 
00117 void KDGanttSizingControl::changeState()
00118 {
00119     restore(_isMinimized);
00120 }
00121 
00122 
00148 #ifndef KDGANTT_MASTER_CVS
00149 #include "KDGanttSizingControl.moc"
00150 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys