┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/searchcriterionvalue.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-11-13 22:48:07 +0000
committerPeter Penz <[email protected]>2009-11-13 22:48:07 +0000
commit3d7b54b21a47e98d1d02c7d21061a6bd43b8d1c7 (patch)
tree24a1db2c4b375d6f4d3ecc4ef2a4de6506374134 /src/search/searchcriterionvalue.h
parentbd30bb6ca98374b37db20d14a41542c21acdd5e0 (diff)
Implemented initialization of value-widgets. This allows e.g. to apply dates like "today", "last week", ... to the date-value-widgets just by specifying a search criterion.
svn path=/trunk/KDE/kdebase/apps/; revision=1048771
Diffstat (limited to 'src/search/searchcriterionvalue.h')
-rw-r--r--src/search/searchcriterionvalue.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/search/searchcriterionvalue.h b/src/search/searchcriterionvalue.h
index 972b95f7a..652b58a7c 100644
--- a/src/search/searchcriterionvalue.h
+++ b/src/search/searchcriterionvalue.h
@@ -39,8 +39,21 @@ public:
SearchCriterionValue(QWidget* parent = 0);
virtual ~SearchCriterionValue();
+ /**
+ * Must be overwritten by derived classes and returns
+ * the string representation of the search criterion value.
+ */
virtual QString value() const = 0;
+ /**
+ * Initializes the widget on the base of the given value-type.
+ * It is in the hand of the derived classes to interprete
+ * the value-type string and create a corresponding value for
+ * the widget (@see SearchCriterionSelector::Comparator).
+ * The default implementation is empty.
+ */
+ virtual void initializeValue(const QString& valueType);
+
signals:
void valueChanged(const QString& value);
};
@@ -56,7 +69,8 @@ public:
DateValue(QWidget* parent = 0);
virtual ~DateValue();
virtual QString value() const;
-
+ virtual void initializeValue(const QString& valueType);
+
private:
KDateWidget* m_dateWidget;
};