1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-25 16:43:33 +00:00
OpenMW/components/contentselector/view/profilescombobox.hpp

43 lines
1.1 KiB
C++
Raw Normal View History

#ifndef PROFILESCOMBOBOX_HPP
#define PROFILESCOMBOBOX_HPP
#include <QComboBox>
#include <QStylePainter>
class QString;
class QRegExpValidator;
namespace ContentSelectorView
{
class ProfilesComboBox : public QComboBox
{
Q_OBJECT
public:
explicit ProfilesComboBox(QWidget *parent = 0);
void setEditEnabled(bool editable);
void setPlaceholderText(const QString &text);
// void indexChanged(int index);
signals:
void signalProfileTextChanged(const QString &item);
void signalProfileChanged(const QString &previous, const QString &current);
void signalProfileChanged(int index);
void profileRenamed(const QString &oldName, const QString &newName);
private slots:
void slotEditingFinished();
void slotIndexChangedByUser(int index);
void slotTextChanged(const QString &text);
private:
QString mOldProfile;
2013-08-18 17:11:23 -05:00
QString mPlaceholderText;
QRegExpValidator *mValidator;
protected:
void paintEvent(QPaintEvent *);
};
}
#endif // PROFILESCOMBOBOX_HPP