mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-09 10:45:56 -05:00
This required the following adjustments: Instead of having a dedicated entry indicating the empty selection the setPlaceholderText() mechanism is used. Thus the locations where the 1st entry was assumed to be the empty selection would have to be adjusted. Additional checks for the empty string / index -1 have been added. FindIdxInRagne() was adjusted to return -1 instead of 0 in case the given string was not found. Switched to index based singal instead of text based signal to be notified about selection changes.
38 lines
743 B
C++
38 lines
743 B
C++
#pragma once
|
|
#include "filter-combo-box.hpp"
|
|
|
|
#include <QDialog>
|
|
|
|
namespace advss {
|
|
|
|
class Macro;
|
|
class MacroRef;
|
|
|
|
class MacroSelection : public FilterComboBox {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MacroSelection(QWidget *parent);
|
|
void SetCurrentMacro(const MacroRef &);
|
|
void HideSelectedMacro(); // Macro currently being edited
|
|
void ShowAllMacros();
|
|
|
|
private slots:
|
|
void MacroAdd(const QString &name);
|
|
void MacroRemove(const QString &name);
|
|
void MacroRename(const QString &oldName, const QString &newName);
|
|
};
|
|
|
|
class MacroSelectionDialog : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MacroSelectionDialog(QWidget *parent);
|
|
static bool AskForMacro(QWidget *parent, std::string ¯oName);
|
|
|
|
private:
|
|
MacroSelection *_macroSelection;
|
|
};
|
|
|
|
} // namespace advss
|