kspread
AutoFillCommand.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright 2006-2007 Stefan Nikolaus <stefan.nikolaus@kdemail.net> 00003 Copyright 2003 Ariya Hidayat <ariya@kde.org> 00004 Copyright 2002 Norbert Andres <nandres@web.de> 00005 Copyright 2001-2002 Laurent Montel <montel@kde.org> 00006 Copyright 2001 David Faure <faure@kde.org> 00007 Copyright 2000 Werner Trobin <trobin@kde.org> 00008 Copyright 1998-1999 Torben Weis <weis@kde.org> 00009 00010 This library is free software; you can redistribute it and/or 00011 modify it under the terms of the GNU Library General Public 00012 License as published by the Free Software Foundation; either 00013 version 2 of the License, or (at your option) any later version. 00014 00015 This library is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 Library General Public License for more details. 00019 00020 You should have received a copy of the GNU Library General Public License 00021 along with this library; see the file COPYING.LIB. If not, write to 00022 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00023 Boston, MA 02110-1301, USA. 00024 */ 00025 00026 00027 #ifndef KSPREAD_AUTOFILL_COMMAND 00028 #define KSPREAD_AUTOFILL_COMMAND 00029 00030 #include "DataManipulators.h" 00031 00032 #include <QList> 00033 #include <QRect> 00034 #include <QString> 00035 #include <QStringList> 00036 00037 namespace KSpread 00038 { 00039 class AutoFillSequence; 00040 class Cell; 00041 00042 class AutoFillCommand : public AbstractDataManipulator 00043 { 00044 public: 00048 AutoFillCommand(); 00049 00053 virtual ~AutoFillCommand(); 00054 00055 void setSourceRange( const QRect& range ); 00056 void setTargetRange( const QRect& range ); 00057 00061 virtual bool mainProcessing(); 00062 00063 public: 00064 static QStringList *other; 00065 static QStringList *month; 00066 static QStringList *day; 00067 static QStringList *shortMonth; 00068 static QStringList *shortDay; 00069 00070 private: 00071 void fillSequence( const QList<Cell>& _srcList, 00072 const QList<Cell>& _destList, 00073 const AutoFillSequence& _seqList, 00074 bool down = true ); 00075 // dummy 00076 virtual Value newValue( Element*, int, int, bool*, Format::Type* ) { return Value(); } 00077 00078 private: 00079 QRect m_sourceRange; 00080 QRect m_targetRange; 00081 }; 00082 00083 } // namespace KSpread 00084 00085 #endif // KSPREAD_AUTOFILL_COMMAND
