2012-10-22 23:47:07 +00:00
|
|
|
#ifndef PROFILESCOMBOBOX_HPP
|
|
|
|
#define PROFILESCOMBOBOX_HPP
|
|
|
|
|
|
|
|
#include <QComboBox>
|
2013-08-16 23:00:23 +00:00
|
|
|
#include <QStylePainter>
|
2012-10-22 23:47:07 +00:00
|
|
|
class QString;
|
|
|
|
class QRegExpValidator;
|
|
|
|
|
2013-09-22 04:06:29 +00:00
|
|
|
namespace ContentSelectorView
|
2012-10-22 23:47:07 +00:00
|
|
|
{
|
2013-08-18 20:11:29 +00:00
|
|
|
class ProfilesComboBox : public QComboBox
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit ProfilesComboBox(QWidget *parent = 0);
|
|
|
|
void setEditEnabled(bool editable);
|
2013-08-18 22:11:23 +00:00
|
|
|
void setPlaceholderText (const QString &text);
|
2012-10-22 23:47:07 +00:00
|
|
|
|
2013-08-18 20:11:29 +00:00
|
|
|
signals:
|
|
|
|
void profileChanged(const QString &previous, const QString ¤t);
|
|
|
|
void profileRenamed(const QString &oldName, const QString &newName);
|
2013-08-16 23:00:23 +00:00
|
|
|
|
2013-08-18 20:11:29 +00:00
|
|
|
private slots:
|
|
|
|
void slotEditingFinished();
|
|
|
|
void slotIndexChanged(int index);
|
|
|
|
void slotTextChanged(const QString &text);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString mOldProfile;
|
2013-08-18 22:11:23 +00:00
|
|
|
QString mPlaceholderText;
|
2013-08-18 20:11:29 +00:00
|
|
|
QRegExpValidator *mValidator;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *);
|
|
|
|
};
|
|
|
|
}
|
2012-10-22 23:47:07 +00:00
|
|
|
|
|
|
|
#endif // PROFILESCOMBOBOX_HPP
|