comparison transform/TransformFactory.h @ 33:544ab25d2372

* Add support for plugin classification using category files. Add separate menus listing plugins by category, maker, and plugin name.
author Chris Cannam
date Thu, 21 Sep 2006 16:43:50 +0000
parents 61259228d029
children 8ad306d8a568
comparison
equal deleted inserted replaced
32:e3b32dc5180b 33:544ab25d2372
40 // shorter version of the description. The type is also intended 40 // shorter version of the description. The type is also intended
41 // to be user-readable, for use in menus. 41 // to be user-readable, for use in menus.
42 42
43 struct TransformDesc { 43 struct TransformDesc {
44 TransformDesc() { } 44 TransformDesc() { }
45 TransformDesc(QString _type, TransformName _name, QString _description, 45 TransformDesc(QString _type, QString _category,
46 TransformName _name, QString _description,
46 QString _friendlyName, QString _maker, 47 QString _friendlyName, QString _maker,
47 QString _units, bool _configurable) : 48 QString _units, bool _configurable) :
48 type(_type), name(_name), description(_description), 49 type(_type), category(_category),
50 name(_name), description(_description),
49 friendlyName(_friendlyName), 51 friendlyName(_friendlyName),
50 maker(_maker), units(_units), configurable(_configurable) { } 52 maker(_maker), units(_units), configurable(_configurable) { }
51 QString type; 53 QString type;
54 QString category;
52 TransformName name; 55 TransformName name;
53 QString description; 56 QString description;
54 QString friendlyName; 57 QString friendlyName;
55 QString maker; 58 QString maker;
56 QString units; 59 QString units;
59 typedef std::vector<TransformDesc> TransformList; 62 typedef std::vector<TransformDesc> TransformList;
60 63
61 TransformList getAllTransforms(); 64 TransformList getAllTransforms();
62 65
63 std::vector<QString> getAllTransformTypes(); 66 std::vector<QString> getAllTransformTypes();
67
68 std::vector<QString> getTransformCategories(QString transformType);
69 std::vector<QString> getTransformMakers(QString transformType);
64 70
65 /** 71 /**
66 * Get a configuration XML string for the given transform (by 72 * Get a configuration XML string for the given transform (by
67 * asking the user, most likely). Returns true if the transform 73 * asking the user, most likely). Returns true if the transform
68 * is acceptable, false if the operation should be cancelled. 74 * is acceptable, false if the operation should be cancelled.