Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KLFLIBENTRYEDITOR_H
00025 #define KLFLIBENTRYEDITOR_H
00026
00027 #include <QWidget>
00028 #include <QComboBox>
00029
00030 #include <klflib.h>
00031
00032
00033
00034 namespace Ui { class KLFLibEntryEditor; }
00035
00036 class KLF_EXPORT KLFLibEntryEditor : public QWidget
00037 {
00038 Q_OBJECT
00039 public:
00040 KLFLibEntryEditor(QWidget *parent = NULL);
00041 virtual ~KLFLibEntryEditor();
00042
00043 void addCategorySuggestions(const QStringList& categorylist);
00044
00045 virtual bool eventFilter(QObject *object, QEvent *event);
00046
00047 inline bool metaInfoModified() const { return pMetaInfoModified; }
00048
00049 signals:
00050
00054 void metaInfoChanged(const QMap<int,QVariant>& props);
00055
00056 void restoreStyle(const KLFStyle& style);
00057
00058 public slots:
00059
00060 void displayEntry(const KLFLibEntry& entry);
00061
00064 void displayEntries(const QList<KLFLibEntry>& entries);
00065
00071 void setInputEnabled(bool enabled);
00072
00073 void retranslateUi(bool alsoBaseUi = true);
00074
00075 protected slots:
00076
00077 void slotUpdateFromCbx(QComboBox *cbx);
00078
00079 void on_btnApplyChanges_clicked();
00080 void on_btnRestoreStyle_clicked();
00084 void slotApplyChanges() { slotApplyChanges(true, true); }
00085 void slotApplyChanges(bool category, bool tags);
00086
00087 void slotModified(bool modif = true);
00088
00089 void slotCbxSaveCurrentCompletion(QComboBox *cbx);
00090 void slotCbxCleanUpCompletions(QComboBox *cbx);
00091
00092 private:
00093 Ui::KLFLibEntryEditor *u;
00094
00095 bool pInputEnabled;
00096
00097 bool pMetaInfoModified;
00098
00099 KLFStyle pCurrentStyle;
00100
00101
00102 void displayStyle(bool valid, const KLFStyle& style);
00103 };
00104
00105
00106
00107
00108
00109
00110
00111 #endif