kdenonbeta/kdedebian/kapture
CVS commit by mornfall:
Start some work on (dynamic) grouper setup UI. Make it possible for
grouper to export it's parameter map description. Start
GrouperSetupWidget, that takes a GrouperFactory pointer and uses it to
produce some set-up layout. Should be rather portable among frontends
(hopefully). Hope it won't produce too crappy interface ;).
A libcapture/param.cpp 1.1 [no copyright]
A libkapture/groupersetupwidget.cpp 1.1 [no copyright]
A libkapture/groupersetupwidget.h 1.1 [LGPL (v2+)]
M +1 -1 TODO 1.45
M +1 -1 libcapture/Makefile.am 1.18
M +4 -0 libcapture/filters.h 1.17
M +2 -0 libcapture/grouper.h 1.27
M +15 -0 libcapture/param.h 1.6
M +4 -2 libkapture/Makefile.am 1.17
M +0 -1 libkapture/kapturemanager.cpp 1.28
--- kdenonbeta/kdedebian/kapture/TODO #1.44:1.45
@@ -189,5 +189,5 @@
capture::PkgManager)
- DYNAMIC FILTER REGISTRATION AND SELECTION [done: 30%]
+ DYNAMIC FILTER REGISTRATION AND SELECTION [done: 50%]
Make it possible in libcapture, via eg. PkgFilterManager class to get list
of filters together with description and get their types. Also should
--- kdenonbeta/kdedebian/kapture/libcapture/Makefile.am #1.17:1.18
@@ -24,5 +24,5 @@
pkgcache.cpp safeiterators.cpp pkggroup.cpp \
grouper.cpp filters.cpp depgroupers.cpp \
- tree.cpp treenode.cpp \
+ tree.cpp treenode.cpp param.cpp \
groupermanager.cpp pkgmanager.cpp pkgsystem.cpp dpkgpm.cpp \
stl_util.cpp
--- kdenonbeta/kdedebian/kapture/libcapture/filters.h #1.16:1.17
@@ -71,4 +71,8 @@ namespace capture {
FILT_CLASS (PkgNameFilter, "Package Name");
FILT_FLAGS (HasParser);
+ GRP_PARDES (
+ "string", ParamDescr::String, "String to match", "",
+ "type", ParamDescr::String, "Type of match", "can be regex, substr, whole",
+ 0);
protected:
std::string m_str;
--- kdenonbeta/kdedebian/kapture/libcapture/grouper.h #1.26:1.27
@@ -65,4 +65,5 @@
GRP_CLASS (t, _n) \
void addNode (TreeNode *n, TreeNode *r);
+#define GRP_PARDES(a...) ParamDescr::Map paramDescr () { return ParamDescr::createMap (a); };
#define GROUPER_CONSTR(t) t::t (GrouperFactory *f, const Param::Map &a)
@@ -106,4 +107,5 @@ namespace capture {
virtual unsigned flags () { return 0; };
virtual Param::Map parseArgs (std::string) { return Param::Map (); };
+ virtual ParamDescr::Map paramDescr () { return ParamDescr::Map (); };
virtual ~Grouper () {};
--- kdenonbeta/kdedebian/kapture/libcapture/param.h #1.5:1.6
@@ -136,4 +136,19 @@ namespace capture
};
/* }}} */
+ // ParamDescr {{{
+ // ----------------------------------------------------------------------
+ class ParamDescr : public Param {
+ public:
+ typedef std::vector <ParamDescr> Map;
+ static Map createMap (const char *, ...);
+ enum Type { NoType, String };
+ ParamDescr (const char *n, Type t, const char *uiN, const char *descr)
+ : description (descr), uiName (uiN), vtype (t), type (n) {};
+ ParamDescr () : vtype (NoType) {};
+ std::string description;
+ std::string uiName;
+ std::string type;
+ Type vtype;
+ };
}
--- kdenonbeta/kdedebian/kapture/libkapture/Makefile.am #1.16:1.17
@@ -12,5 +12,6 @@
kapturemanager.h \
acqprogress.h progresswidget.h errordialog.h commitstatus.h \
- listtreewidget.h summaryview.h
+ listtreewidget.h summaryview.h \
+ groupersetupwidget.h
# let automoc handle all of the meta source files (moc)
@@ -35,5 +36,6 @@
listtreeview.cpp listtreewidget.cpp \
summaryviewui.ui summaryview.cpp\
- kapturemanager.cpp dpkgpm.cpp
+ kapturemanager.cpp dpkgpm.cpp \
+ groupersetupwidget.cpp
libkapture_la_LDFLAGS = $(all_libraries) -no-undefined
Reply to: