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