2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2006-06-17 09:14:58 +00:00
|
|
|
* \file Action.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2006-06-17 09:14:58 +00:00
|
|
|
#ifndef ACTION_H
|
|
|
|
#define ACTION_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
#include "frontends/LyXView.h"
|
|
|
|
#include "funcrequest.h"
|
|
|
|
|
|
|
|
#include <QAction>
|
|
|
|
|
|
|
|
//class FuncRequest;
|
|
|
|
|
|
|
|
//class string;
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
/**
|
2006-06-17 09:14:58 +00:00
|
|
|
* Action - Qt interface with LyX' FuncRequest.
|
2006-03-05 17:24:44 +00:00
|
|
|
*
|
2006-06-17 09:14:58 +00:00
|
|
|
* Action can be used in LyX menubar and/or toolbars.
|
2006-03-05 17:24:44 +00:00
|
|
|
*/
|
2006-06-17 09:14:58 +00:00
|
|
|
class Action: public QAction {
|
2006-03-05 17:24:44 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
|
2006-06-17 09:14:58 +00:00
|
|
|
Action(LyXView & lyxView, std::string const & text,
|
2006-03-05 17:24:44 +00:00
|
|
|
FuncRequest const & func, std::string const & tooltip="");
|
|
|
|
|
2006-06-17 09:14:58 +00:00
|
|
|
Action(LyXView & lyxView, std::string const & icon, std::string const & text,
|
2006-03-05 17:24:44 +00:00
|
|
|
FuncRequest const & func, std::string const & tooltip="");
|
|
|
|
|
|
|
|
void update();
|
|
|
|
|
|
|
|
// void setAction(FuncRequest const & func);
|
|
|
|
|
2006-06-30 14:37:33 +00:00
|
|
|
private Q_SLOTS:
|
2006-03-05 17:24:44 +00:00
|
|
|
void action();
|
|
|
|
|
|
|
|
private:
|
|
|
|
FuncRequest const & func_ ;
|
|
|
|
//FuncRequest func_ ;
|
|
|
|
LyXView & lyxView_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2006-06-17 09:14:58 +00:00
|
|
|
#endif // ACTION_H
|