openmw-tes3coop/components/contentselector/view/profilescombobox.hpp
graffy76 00c78a4aa1 Implementing ContentSelector class in DataFilesPage
Moved AdjusterWidget / FileWidget to ContentSelectorView
2013-10-01 21:29:45 -05:00

40 lines
1,005 B
C++

#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);
signals:
void signalProfileTextChanged (const QString &item);
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;
QString mPlaceholderText;
QRegExpValidator *mValidator;
protected:
void paintEvent(QPaintEvent *);
};
}
#endif // PROFILESCOMBOBOX_HPP