Warning, file /office/skrooge/skgbasegui/kdatevalidator.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002   This file is part of libkdepim.
0003 
0004   Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
0005   Copyright (c) 2002 David Jarvie <software@astrojar.org.uk>
0006   Copyright (c) 2004 Tobias Koenig <tokoe@kde.org>
0007 
0008   This library is free software; you can redistribute it and/or
0009   modify it under the terms of the GNU Library General Public
0010   License as published by the Free Software Foundation; either
0011   version 2 of the License, or (at your option) any later version.
0012 
0013   This library is distributed in the hope that it will be useful,
0014   but WITHOUT ANY WARRANTY; without even the implied warranty of
0015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016   Library General Public License for more details.
0017 
0018   You should have received a copy of the GNU Library General Public License
0019   along with this library; see the file COPYING.LIB.  If not, write to
0020   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0021   Boston, MA 02110-1301, USA.
0022 */
0023 
0024 #ifndef KDEPIM_KDATEVALIDATOR_H
0025 #define KDEPIM_KDATEVALIDATOR_H
0026 
0027 #include <qvalidator.h>
0028 
0029 #include "skgbasegui_export.h"
0030 
0031 namespace KPIM
0032 {
0033 
0034 class KDateValidatorPrivate;
0035 
0036 class SKGBASEGUI_EXPORT KDateValidator : public QValidator
0037 {
0038     Q_OBJECT
0039 
0040 public:
0041     enum FixupBehavior {
0042         NoFixup = 0,
0043         FixupCurrent,
0044         FixupForward,
0045         FixupBackward
0046     };
0047     Q_ENUM(FixupBehavior)
0048 
0049     explicit KDateValidator(QObject* iParent = nullptr);
0050     ~KDateValidator() override;
0051 
0052     void setKeywords(const QStringList& iKeywords);
0053     QStringList keywords() const;
0054 
0055     void setFixupBehavior(FixupBehavior behavior);
0056     FixupBehavior fixupBehavior() const;
0057 
0058     /*reimp*/
0059     State validate(QString& str, int& pos) const override;
0060     /*reimp*/
0061     void fixup(QString& input) const override;
0062 
0063 private:
0064     KDateValidatorPrivate* const d;
0065 };
0066 
0067 } // namespace KPIM
0068 
0069 #endif
0070