1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/opencs/view/widget/scenetoolrun.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.4 KiB
C++
Raw Normal View History

#ifndef CSV_WIDGET_SCENETOOLRUN_H
#define CSV_WIDGET_SCENETOOLRUN_H
2014-09-13 18:53:35 +02:00
#include <set>
#include <string>
2022-10-19 19:02:00 +02:00
#include <vector>
#include "scenetool.hpp"
2014-09-07 14:40:50 +02:00
class QFrame;
class QTableWidget;
class QModelIndex;
2022-10-19 19:02:00 +02:00
class QObject;
class QPoint;
2014-09-07 14:40:50 +02:00
namespace CSVWidget
{
2022-10-19 19:02:00 +02:00
class SceneToolbar;
class SceneToolRun : public SceneTool
{
Q_OBJECT
2014-09-13 18:53:35 +02:00
std::set<std::string> mProfiles;
std::set<std::string>::iterator mSelected;
QString mToolTip;
2014-09-07 14:40:50 +02:00
QFrame* mPanel;
QTableWidget* mTable;
private:
void adjustToolTips();
void updateIcon();
void updatePanel();
2022-09-22 21:26:05 +03:00
public:
2014-09-07 14:40:50 +02:00
SceneToolRun(SceneToolbar* parent, const QString& toolTip, const QString& icon,
const std::vector<std::string>& profiles);
void showPanel(const QPoint& position) override;
2014-11-27 09:27:29 +01:00
void activate() override;
/// \attention This function does not remove the profile from the profile selection
/// panel.
void removeProfile(const std::string& profile);
/// \attention This function doe not add the profile to the profile selection
/// panel. This only happens when the panel is re-opened.
2022-09-22 21:26:05 +03:00
///
2014-09-13 18:53:35 +02:00
/// \note Adding profiles that are already listed is a no-op.
void addProfile(const std::string& profile);
2014-09-07 14:40:50 +02:00
private slots:
2014-09-13 18:53:35 +02:00
void clicked(const QModelIndex& index);
2014-09-07 14:40:50 +02:00
signals:
void runRequest(const std::string& profile);
};
}
#endif