[bt-devel] Config system

Eeli Kaikkonen eekaikko at mail.student.oulu.fi
Thu Feb 19 11:51:16 MST 2009


Gary Holmlund wrote:

> BtActionCollection should be easy to write. I need it to continue with 
> my changes. I will plan to do it tonight.
> 
> Perhaps a branch does make sense for this. I may do that.
> 

I tried to find out how exactly KAC is used and found these:

kaction = new KAction(tr("Next book"), ac);
ac->addAction("nextBook", kaction);
a->addAction(KStandardAction::ZoomIn, "zoomIn", 0, 0);
ac->action("nextEntry")->setEnabled(false);
m_actionCollection = new KActionCollection(this);

I first thought that it's used for some automatic things but didn't find 
any. This really makes it easy:

class BtActionCollection : public QObject
{
	Q_OBJECT
public:
	BtActionCollection(QWidget* parent);
	~BtActionCollection();

	QAction* addAction(QString name, QAction* action);
	QAction* action(QString name);
};

Standard actions are a problem - they have to be converted to QAction 
first to avoid creating a temporary addAction method.

--Eeli Kaikkonen



More information about the bt-devel mailing list