kspread

kspread_dlg_subtotal.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002-2003 Norbert Andres <nandres@web.de>
00003              (C) 2002 Philipp Mueller <philipp.mueller@gmx.de>
00004              (C) 2002 Laurent Montel <montel@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 
00023 #ifndef __kspread_dlg_subtotal__
00024 #define __kspread_dlg_subtotal__
00025 
00026 #include <kdialogbase.h>
00027 
00028 #include <qpoint.h>
00029 #include <qrect.h>
00030 
00031 class QLineEdit;
00032 
00033 namespace KSpread
00034 {
00035 class Sheet;
00036 class Subtotal;
00037 class View;
00038 
00039 class SubtotalDialog : public KDialogBase
00040 { 
00041   Q_OBJECT
00042 
00043  public:
00044   SubtotalDialog( View * parent, QRect const & selection, 
00045                       const char * name );
00046   ~SubtotalDialog();
00047 
00048   QRect const & selection() const { return m_selection; }
00049   Sheet * sheet() const { return m_pSheet; }
00050 
00051  private slots:
00052   void slotOk();
00053   void slotCancel();
00054   void slotUser1();
00055 
00056  private:
00057   View  *    m_pView;
00058   Sheet *    m_pSheet;
00059   QRect             m_selection;
00060   Subtotal * m_dialog;
00061 
00062   void fillColumnBoxes();
00063   void fillFunctionBox();
00064   void removeSubtotalLines();
00065   bool addSubtotal( int mainCol, int column, int row, int topRow, 
00066                     bool addRow, QString const & text );
00067 };
00068 
00069 } // namespace KSpread
00070 
00071 #endif
00072 
KDE Home | KDE Accessibility Home | Description of Access Keys