mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 07:56:40 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			47 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef PROFILESCOMBOBOX_HPP
 | 
						|
#define PROFILESCOMBOBOX_HPP
 | 
						|
 | 
						|
#include "components/contentselector/view/combobox.hpp"
 | 
						|
#include "lineedit.hpp"
 | 
						|
 | 
						|
#include <QDebug>
 | 
						|
 | 
						|
class QString;
 | 
						|
 | 
						|
class ProfilesComboBox : public ContentSelectorView::ComboBox
 | 
						|
{
 | 
						|
    Q_OBJECT
 | 
						|
 | 
						|
public:
 | 
						|
    class ComboBoxLineEdit : public LineEdit
 | 
						|
    {
 | 
						|
    public:
 | 
						|
        explicit ComboBoxLineEdit (QWidget *parent = 0);
 | 
						|
    };
 | 
						|
 | 
						|
public:
 | 
						|
 | 
						|
    explicit ProfilesComboBox(QWidget *parent = 0);
 | 
						|
    void setEditEnabled(bool editable);
 | 
						|
    void setCurrentProfile(int index)
 | 
						|
    {
 | 
						|
        ComboBox::setCurrentIndex(index);
 | 
						|
        mOldProfile = currentText();
 | 
						|
    }
 | 
						|
 | 
						|
signals:
 | 
						|
    void signalProfileTextChanged(const QString &item);
 | 
						|
    void signalProfileChanged(const QString &previous, const QString ¤t);
 | 
						|
    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;
 | 
						|
};
 | 
						|
#endif // PROFILESCOMBOBOX_HPP
 |