From 9fcf15a06b9ec422dbad53508e8ce71d2d4145c3 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 13 Jan 2009 09:59:22 +0000 Subject: A huge amount of changes, based on the results of two usertest. The changes are contained (but not limited to) in the following list: - Make disabled widgets ignored in validation test. - Do not commit values of disabled widgets to the database. - Make storechildren attribute on metawidget, that enables storing of the child widgets in the database. - Implement LUA resume generator. - Make language attribute on resume tag, and switch parser (format/LUA). - Case insensitive search in combobox. - Click on macro name or line, expands macro. - Greyed out widgets in AltComboBox should be hidden instead. - Keyboard 'delete' should delete item from multilist. - "Commit" button needs to be more visible? Icon? - Upon opening of a second macro, the first macro should indicate itself as 'not saved'. - After 'add' in multilist, the input widgets should be reset. - First widget in a macro should have keyboard focus after expansion. - "Endnu ikke udfyldt" needs to be more clear (darker). - Meta widgets must recurse the isValid() call to its children. - Greyed out widgets must be hidden. - Multilist should be read as a list prior to its input fields. - Visible field on widgets. Hides a widget without disabling it. --- client/widgets/widget.h | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'client/widgets/widget.h') diff --git a/client/widgets/widget.h b/client/widgets/widget.h index 9b6a996..2977e3a 100644 --- a/client/widgets/widget.h +++ b/client/widgets/widget.h @@ -38,13 +38,35 @@ class Widget { public: Widget(QDomNode &node, MacroWindow *macrowindow); virtual ~Widget(){} - virtual QString getValue(); - virtual void setValue(QString value); + + virtual QString getValue() { return ""; } + virtual void setValue(QString value, QString source = ""); + virtual bool isValid(); - virtual void disable(); - virtual void enable(); + + virtual void disable() {} + virtual void enable() {} + virtual bool isDisabled() { return false; } + + virtual void setVisibility(bool) {} + QString getName(); + /** + * Connect some signal from this object to some slot in some other object. + */ + virtual void connectFrom(const char *, const QObject *, const char *) {} + + /** + * Connect some signal from some other object to some slot in this object. + */ + virtual void connectTo(const QObject *, const char *, const char *) {} + + virtual bool setKeyboardFocus() { return false; } + + void setInitialValue(QString value); + virtual void reset(); + protected: QString widget_name; @@ -60,6 +82,9 @@ private: QString luaprogram; LUA *lua; MacroWindow *macrowindow; + + QString initial_value; + bool has_initial_value; }; #endif/*__PRACRO_WIDGET_H__*/ -- cgit v1.2.3