kspread Library API Documentation

kspread_dlg_conditional.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002-2003 Norbert Andres <nandres@web.de>
00003              (C) 2002-2003 Philipp Mueller <philipp.mueller@gmx.de>
00004              (C) 2002 John Dailey <dailey@vt.edu>
00005              (C) 1999-2004 Laurent Montel <montel@kde.org>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public
00009    License as published by the Free Software Foundation; either
00010    version 2 of the License, or (at your option) any later version.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Library General Public License for more details.
00016 
00017    You should have received a copy of the GNU Library General Public License
00018    along with this library; see the file COPYING.LIB.  If not, write to
00019    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020    Boston, MA 02111-1307, USA.
00021 */
00022 
00023 #ifndef __kspread_dlg_conditional__
00024 #define __kspread_dlg_conditional__
00025 
00026 #include <kdialogbase.h>
00027 #include <qwidget.h>
00028 
00029 class QComboBox;
00030 class KLineEdit;
00031 
00032 class KSpreadCell;
00033 class KSpreadStyle;
00034 class KSpreadView;
00035 #include "kspread_condition.h"
00036 
00037 class KSpreadConditionalWidget : public QWidget
00038 {
00039   Q_OBJECT
00040 
00041  public:
00042   KSpreadConditionalWidget( QWidget * parent = 0, const char * name = 0, WFlags fl = 0 );
00043   ~KSpreadConditionalWidget();
00044 
00045   QComboBox * m_condition_1;
00046   QComboBox * m_style_1;
00047   KLineEdit * m_firstValue_1;
00048   KLineEdit * m_secondValue_1;
00049 
00050   QComboBox * m_condition_2;
00051   QComboBox * m_style_2;
00052   KLineEdit * m_firstValue_2;
00053   KLineEdit * m_secondValue_2;
00054 
00055   QComboBox * m_condition_3;
00056   QComboBox * m_style_3;
00057   KLineEdit * m_firstValue_3;
00058   KLineEdit * m_secondValue_3;
00059 
00060  public slots:
00061   void slotTextChanged1( const QString & );
00062   void slotTextChanged2( const QString & );
00063   void slotTextChanged3( const QString & );
00064 };
00065 
00066 
00067 class KSpreadConditionalDlg : public KDialogBase
00068 {
00069   Q_OBJECT
00070  public:
00071   KSpreadConditionalDlg( KSpreadView * parent, const char * name,
00072                          const QRect & marker );
00073 
00074   void init();
00075 
00076  public slots:
00077   void slotOk();
00078 
00079  protected:
00080   KSpreadView *              m_view;
00081   KSpreadConditionalWidget * m_dlg;
00082   QRect                      m_marker;
00083   KSpreadConditional         m_result;
00084 
00085  private:
00086   void init( KSpreadConditional const & tmp, int numCondition );
00087   Conditional typeOfCondition( QComboBox const * const cb ) const;
00088 
00089   bool checkInputData( KLineEdit const * const edit1,
00090                        KLineEdit const * const edit2 );
00091   bool checkInputData();
00092   bool getCondition( KSpreadConditional & newCondition, const QComboBox * cb,
00093                      const KLineEdit * edit1, const KLineEdit * edit2,
00094                      const QComboBox * sb, KSpreadStyle * style );
00095 
00096 };
00097 
00098 #endif
00099 
KDE Logo
This file is part of the documentation for kspread Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:42:54 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003