openmw-tes3coop/components/esxselector/view/profilescombobox.hpp

36 lines
842 B
C++

#ifndef PROFILESCOMBOBOX_HPP
#define PROFILESCOMBOBOX_HPP
#include <QComboBox>
#include <QStylePainter>
class QString;
class QRegExpValidator;
namespace EsxView
{
class ProfilesComboBox : public QComboBox
{
Q_OBJECT
public:
explicit ProfilesComboBox(QWidget *parent = 0);
void setEditEnabled(bool editable);
signals:
void profileChanged(const QString &previous, const QString &current);
void profileRenamed(const QString &oldName, const QString &newName);
private slots:
void slotEditingFinished();
void slotIndexChanged(int index);
void slotTextChanged(const QString &text);
private:
QString mOldProfile;
QRegExpValidator *mValidator;
protected:
void paintEvent(QPaintEvent *);
};
}
#endif // PROFILESCOMBOBOX_HPP