1 /*
2 	Copyright (C) 2008, 2009 Andres Cabrera
3 	mantaraya36@gmail.com
4 
5 	This file is part of CsoundQt.
6 
7 	CsoundQt is free software; you can redistribute it
8 	and/or modify it under the terms of the GNU Lesser General Public
9 	License as published by the Free Software Foundation; either
10 	version 2.1 of the License, or (at your option) any later version.
11 
12 	CsoundQt is distributed in the hope that it will be useful,
13 	but WITHOUT ANY WARRANTY; without even the implied warranty of
14 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 	GNU Lesser General Public License for more details.
16 
17 	You should have received a copy of the GNU Lesser General Public
18 	License along with Csound; if not, write to the Free Software
19 	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 	02111-1307 USA
21 */
22 
23 #ifndef QUTECOMBOBOX_H
24 #define QUTECOMBOBOX_H
25 
26 #include "qutewidget.h"
27 
28 class QuteComboBox : public QuteWidget
29 {
30 	Q_OBJECT
31 public:
32 	QuteComboBox(QWidget *parent);
33 	~QuteComboBox();
34 
35 	virtual QString getWidgetLine();
36 	virtual QString getCabbageLine();
37 	virtual QString getWidgetXmlText();
38 	virtual QString getWidgetType();
39 	virtual QString getQml();
40 	void setText(QString text);  //Text for this widget is the item list separated by commas
41 	void clearItems();
42 	void addItem(QString text, double value, QString stringvalue);
43 	virtual void refreshWidget();
44 	virtual void applyInternalProperties();
45 
46 protected:
47 	virtual void applyProperties();
48 	virtual void createPropertiesDialog();
49 
50 private:
51 	QString itemList();
52 	QStringList stringValues;
53 	//    int m_size;
54 	QLineEdit *text;
55 	QLineEdit *line;
56 
57 private slots:
58 	void indexChanged(int value);
59 
60 };
61 
62 #endif
63