summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/oblique/cmodule.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit84da08d7b7fcda12c85caeb5a10b4903770a6f69 (patch)
tree2a6aea76f2dfffb4cc04bb907c4725af94f70e72 /noatun-plugins/oblique/cmodule.h
downloadtdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.tar.gz
tdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.zip
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/kdeaddons@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun-plugins/oblique/cmodule.h')
-rw-r--r--noatun-plugins/oblique/cmodule.h123
1 files changed, 123 insertions, 0 deletions
diff --git a/noatun-plugins/oblique/cmodule.h b/noatun-plugins/oblique/cmodule.h
new file mode 100644
index 0000000..f60c6c3
--- /dev/null
+++ b/noatun-plugins/oblique/cmodule.h
@@ -0,0 +1,123 @@
+// Copyright (c) 2003 Charles Samuels <charles@kde.org>
+// See the file COPYING for redistribution terms.
+
+#ifndef CMODULE_H
+#define CMODULE_H
+
+#include <noatun/pref.h>
+#include "query.h"
+
+class KListView;
+class KLineEdit;
+class QDialog;
+class Oblique;
+class QCheckBox;
+class QComboBox;
+class QPushButton;
+class QTabWidget;
+
+class SchemaConfig : public QWidget
+{
+Q_OBJECT
+ Oblique *mOblique;
+
+ KListView *mSchemaTree;
+ KLineEdit *mPropertyEdit, *mValueEdit, *mPresentationEdit;
+ QComboBox *mSchemaList;
+
+ QCheckBox *mOptionPlayable, *mOptionChildrenVisible, *mOptionAutoOpen;
+
+ QPushButton *mAdd, *mRemove, *mCopy;
+
+ QPushButton *mAddSibling, *mAddChild, *mRemoveSelf;
+
+ QDialog *mRegexpEditor;
+ bool mIgnore;
+
+ struct QueryItem
+ {
+ Query query;
+ QString title;
+ bool changed;
+ };
+
+ QMap<QString, QueryItem> mQueries;
+
+public:
+ SchemaConfig(QWidget *parent, Oblique *oblique);
+
+ Oblique *oblique() { return mOblique; }
+
+ void reopen();
+ void save();
+
+ static QString nameToFilename(const QString &name);
+ static QString filenameToName(const QString &filename);
+
+public slots:
+ void newSchema();
+ void copySchema();
+ void removeSchema();
+
+ void selectSchema(const QString &title);
+
+ void addSibling();
+ void addChild();
+ void removeSelf();
+
+ void setCurrentModified();
+
+private slots:
+ void editValueRegexp();
+
+ void setCurrent(QListViewItem *_item);
+ void updateCurrent();
+
+ void move(QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow);
+
+private:
+ QueryItem *currentQuery();
+};
+
+class SliceListItem;
+
+class SliceConfig : public QWidget
+{
+Q_OBJECT
+ Oblique *mOblique;
+ KListView *mSliceList;
+ QPushButton *mAdd, *mRemove;
+ QValueList<SliceListItem*> mAddedItems;
+ QValueList<Slice*> mRemovedItems;
+
+public:
+ SliceConfig(QWidget *parent, Oblique *oblique);
+ Oblique *oblique() { return mOblique; }
+
+ void reopen();
+ void save();
+
+
+ SliceListItem *currentItem();
+
+private slots:
+ void addSibling();
+ void removeSelf();
+};
+
+class Configure : public CModule
+{
+Q_OBJECT
+ QTabWidget *tabs;
+ SchemaConfig *schema;
+ SliceConfig *slice;
+
+public:
+ Configure(Oblique *parent);
+
+ virtual void reopen();
+ virtual void save();
+};
+
+
+#endif