From ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../kvoctrain/entry-dialogs/CommonEntryPage.h | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 kvoctrain/kvoctrain/entry-dialogs/CommonEntryPage.h (limited to 'kvoctrain/kvoctrain/entry-dialogs/CommonEntryPage.h') diff --git a/kvoctrain/kvoctrain/entry-dialogs/CommonEntryPage.h b/kvoctrain/kvoctrain/entry-dialogs/CommonEntryPage.h new file mode 100644 index 00000000..71bbd84a --- /dev/null +++ b/kvoctrain/kvoctrain/entry-dialogs/CommonEntryPage.h @@ -0,0 +1,140 @@ +/*************************************************************************** + + edit common properties + + ----------------------------------------------------------------------- + + begin : Mon Jun 28 21:02:16 1999 + + copyright : (C) 1999-2001 Ewald Arnold + (C) 2001 The KDE-EDU team + (C) 2005 Peter Hedlund + + ----------------------------------------------------------------------- + + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef CommonEntryPage_included +#define CommonEntryPage_included + +#include "CommonEntryPageForm.h" + +#include +#include + +class PhoneticEntryPage; +class EntryDlg; + +class CommonEntryPage : public CommonEntryPageForm +{ + Q_OBJECT + +public: + CommonEntryPage + ( + EntryDlg *dlgbook, + kvoctrainDoc *doc, + bool multi_sel, + QString expr, + int less, + QComboBox *lessBox, + QString lang, + QString type, + QString pronunce, + QString usage, + QString label, + QueryManager &querymanager, + bool active, + const QFont& ipafont, + QWidget* parent = NULL, + const char* name = NULL + ); + + void setData( + bool multi_sel, + QString expr, + int less, + QComboBox *lessBox, + QString lang, + QString type, + QString pronunce, + QString usage, + QString label, + QueryManager &querymanager, + bool active); + + bool isDirty() const; + bool lessonDirty () const { return lesson_dirty; } + bool activeDirty () const { return active_dirty; } + bool typeDirty () const { return type_dirty; } + bool usageDirty () const { return usage_dirty; } + + int getLesson () const { return lesson; } + QString getType () const { return type; } + QString getExpr () const { return expression; } + QString getPronunce () const { return pronunce; } + QString getUsageLabel() const { return usageCollection; } + bool getActive () const { return entry_active; } + + bool isModified(); + void setModified(bool mod = true); + void setEnabled(int enable_type); + +signals: + void typeSelected(const QString &); + +protected: + void setTypeBox(const QString &act_type); + void setLessonBox(QComboBox *lessbox, int lesson); + void setUsageBox(const QString & act_type); + +protected slots: + void slotLessonSelected(int); + void slotExprSelected(const QString&); + void slotTypeSelected(int); + void slotSubTypeSelected(int); + void slotPronunceSelected (const QString&); + void slotUsageChanged(); + void slotActiveChanged(bool state); + void phoneticSelected(wchar_t); + void invokeLessDlg(); + void invokeTypeDlg(); + void invokePronDlg(); + void invokeUsageDlg(); + +signals: + void sigModified(); + +protected: + QString pronunce; + QString expression; + QString usageCollection; + int lesson; + QString type; + EntryDlg *dlgbook; + bool lesson_dirty; + bool type_dirty; + kvoctrainDoc *doc; + QueryManager &querymanager; + bool entry_active; + bool active_dirty; + bool usage_dirty; + + vector all_maintypes; + vector all_types; + vector usages; + vector current_subtypes; + + QFont ipafont; + bool modified; +}; +#endif // CommonEntryPage_included -- cgit v1.2.3