kspread

kspread_dlg_find.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 1999-2005 Laurent Montel <montel@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef __kspread_dlg_find__
00021 #define __kspread_dlg_find__
00022 
00023 
00024 #include <kfinddialog.h>
00025 #include <qstringlist.h>
00026 #include <kreplacedialog.h>
00027 
00028 class QCheckBox;
00029 class QPushButton;
00030 class QComboBox;
00031 
00032 namespace KSpread
00033 {
00034 
00035 class FindOption : public QObject
00036 {
00037   Q_OBJECT
00038  public:
00039     FindOption( QWidget *parent);
00040     bool searchInAllSheet() const;
00041 
00042     enum searchTypeValue { Value, Note};
00043     enum searchDirectionValue { Row, Column};
00044 
00045     searchTypeValue searchType() const;
00046     searchDirectionValue searchDirection() const;
00047 
00048 private slots:
00049     void slotMoreOptions();
00050 
00051 signals:
00052     void adjustSize();
00053 
00054 private:
00055     QPushButton *m_moreOptions;
00056     QCheckBox *m_searchInAllSheet;
00057     QWidget *m_findExtension;
00058     QComboBox *m_searchIn;
00059     QComboBox *m_searchDirection;
00060 };
00061 
00062 class FindDlg : public KFindDialog
00063 {
00064   Q_OBJECT
00065 
00066  public:
00067     FindDlg( QWidget *parent = 0, const char *name = 0, long options = 0, const QStringList &findStrings = QStringList(), bool hasSelection = false );
00068     ~FindDlg();
00069     bool searchInAllSheet() const;
00070     FindOption::searchTypeValue searchType() const { return m_findOptions->searchType(); }
00071     FindOption::searchDirectionValue searchDirection() const { return m_findOptions->searchDirection(); }
00072 
00073  private slots:
00074     void slotAjustSize();
00075  private:
00076     FindOption *m_findOptions;
00077 };
00078 
00079 class SearchDlg : public KReplaceDialog
00080 {
00081   Q_OBJECT
00082 
00083  public:
00084     SearchDlg( QWidget *parent = 0, const char *name = 0, long options = 0, const QStringList &findStrings = QStringList(), const QStringList &replaceStrings = QStringList(), bool hasSelection = false );
00085     ~SearchDlg();
00086     bool searchInAllSheet() const;
00087     FindOption::searchTypeValue searchType() const { return m_findOptions->searchType(); }
00088 
00089  private slots:
00090     void slotAjustSize();
00091  private:
00092     FindOption *m_findOptions;
00093 };
00094 
00095 } // namespace KSpread
00096 
00097 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys