File: popconplugincontainer.h

package info (click to toggle)
packagesearch 2.10.1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,704 kB
  • sloc: cpp: 9,176; perl: 248; makefile: 15; sh: 11
file content (79 lines) | stat: -rw-r--r-- 2,017 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef __POPCONPLUGINCONTAINER_H_2010_02_28
#define __POPCONPLUGINCONTAINER_H_2010_02_28

#include <string>

#include <QObject>
#include <QString>

//#include <ept/configuration/apt.h>

#include <baseplugincontainer.h>

using namespace std;




class PopconSettingsWidget;

namespace NPlugin
{

class PopconPlugin;

/** @brief This class provides plugins using the popcon system.
  * 
  * It manages the shared data and offers the possibility to update the popcon database.
  *
  * @author Benjamin Mesing
  */
class PopconPluginContainer : public QObject, public BasePluginContainer 
{
	Q_OBJECT
	
	/** @brief This holds if the popcon operations are currently enabled. 
	  * 
	  * This will be set to false if the reading of the tag database failed. 
	  */
	bool _popconEnabled;

	/** Holds the popcon plugin created. */
	PopconPlugin* _pPopconPlugin;
public:
	/** Empty Constructor  */
	PopconPluginContainer();
	~PopconPluginContainer();
	/** @name PluginContainer Interface
	  *
	  * These functions implement the PluginContainer interface.
	  */
	//@{
	virtual bool init(IProvider* pProvider);
	/** @returns "popconplugin" */
	virtual string name() const {	return "popconplugin"; };
	virtual QString title() const	{ return tr("Popcon Plugins"); };
	/** @brief This returns a list with one entry which is the "Popcon Update" entry
	  *
	  * The QString specifies the menu the action should be added to, the action is
	  * a QAction which is connected to the operation to perform.\n
	  * The default implementation returns an empty vector.
	  */
	vector< pair<QString, QAction*> > actions();
	//@}
	
	/** @brief Returns the #_popconEnabled property. */
	bool popconEnabled()	{ return _popconEnabled; };
protected:
	/** @brief This sets the popcon operations to be enabled/ disabled 
	  *
	  * If set to false all widgets will be disabled, else they will be enabled.
	  * @see #_popconEnabled 
	  */
	void setPopconEnabled(bool enabled);
};

}	// namespace NPlugin

#endif //	__POPCONPLUGINCONTAINER_H_2010_02_28