2014-09-06 14:11:06 +00:00
|
|
|
#ifndef CSV_WIDGET_SCENETOOLRUN_H
|
|
|
|
#define CSV_WIDGET_SCENETOOLRUN_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "scenetool.hpp"
|
|
|
|
|
2014-09-07 12:40:50 +00:00
|
|
|
class QFrame;
|
|
|
|
class QTableWidget;
|
|
|
|
class QModelIndex;
|
|
|
|
|
2014-09-06 14:11:06 +00:00
|
|
|
namespace CSVWidget
|
|
|
|
{
|
|
|
|
class SceneToolRun : public SceneTool
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
std::vector<std::string> mProfiles;
|
|
|
|
int mCurrentIndex;
|
|
|
|
QString mToolTip;
|
|
|
|
QString mIcon;
|
|
|
|
QString mIconDisabled;
|
2014-09-07 12:40:50 +00:00
|
|
|
QFrame *mPanel;
|
|
|
|
QTableWidget *mTable;
|
2014-09-06 14:11:06 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void adjustToolTips();
|
|
|
|
|
|
|
|
void updateIcon();
|
|
|
|
|
2014-09-07 12:40:50 +00:00
|
|
|
void updatePanel();
|
|
|
|
|
2014-09-06 14:11:06 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
SceneToolRun (SceneToolbar *parent, const QString& toolTip, const QString& icon,
|
|
|
|
const QString& iconDisabled, const std::vector<std::string>& profiles);
|
|
|
|
|
|
|
|
virtual void showPanel (const QPoint& position);
|
|
|
|
|
2014-09-07 11:35:30 +00:00
|
|
|
virtual void activate();
|
|
|
|
|
2014-09-07 12:40:50 +00:00
|
|
|
/// \attention This function does not remove the profile from the profile selection
|
|
|
|
/// panel.
|
2014-09-07 10:55:52 +00:00
|
|
|
void removeProfile (const std::string& profile);
|
|
|
|
|
2014-09-07 12:40:50 +00:00
|
|
|
private slots:
|
|
|
|
|
|
|
|
void clicked (const QModelIndex& index);
|
|
|
|
|
2014-09-06 14:11:06 +00:00
|
|
|
signals:
|
|
|
|
|
|
|
|
void runRequest (const std::string& profile);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|