1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
OpenMW/components/contentselector/view/profilescombobox.hpp
graffy76 217a4d75b4 Implemented profile function in launcher datafiles page
Implemented dependency sorting to ensure dependent files appear latest
in the list.
2013-10-06 21:13:47 -05:00

43 lines
1.1 KiB
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);
// 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;
QString mPlaceholderText;
QRegExpValidator *mValidator;
protected:
void paintEvent(QPaintEvent *);
};
}
#endif // PROFILESCOMBOBOX_HPP