dialogList.h 882 Bytes
Newer Older
Sylvain Thery's avatar
Sylvain Thery committed
1 2 3 4 5 6 7 8 9
#ifndef _DIALOG_LIST_H_
#define _DIALOG_LIST_H_


#include <QDialog>
#include <QVBoxLayout>
#include <QListWidget>
#include <QListWidgetItem>

Thery Sylvain's avatar
Thery Sylvain committed
10
#include "dll.h"
Sylvain Thery's avatar
Sylvain Thery committed
11 12 13 14 15 16 17

namespace CGoGN
{

namespace SCHNApps
{

Sylvain Thery's avatar
Sylvain Thery committed
18
class SCHNAPPS_API ListPopUp : public QDialog
Sylvain Thery's avatar
Sylvain Thery committed
19 20 21 22 23 24 25 26 27 28
{
	Q_OBJECT
	QVBoxLayout* m_layout;
	QListWidget* m_list_items;

public:
	ListPopUp(const QString& name, QWidget* parent = NULL);

	virtual ~ListPopUp();

Sylvain Thery's avatar
Sylvain Thery committed
29 30
	virtual void show();

Sylvain Thery's avatar
Sylvain Thery committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
	QListWidget* list();

	QListWidgetItem* addItem(const QString& str, Qt::CheckState checked = Qt::Unchecked);

	QListWidgetItem* getItem(unsigned int row);

	unsigned int nbItems();

	QListWidgetItem* findItem(const QString& str);

	bool removeItem(const QString& str);

	void check(const QString& str, Qt::CheckState ck);

	bool isChecked(const QString& str);

Sylvain Thery's avatar
Sylvain Thery committed
47 48
	virtual QSize sizeHint() const;

Sylvain Thery's avatar
Sylvain Thery committed
49 50 51 52 53 54 55 56 57
};



} // namespace SCHNApps

} // namespace CGoGN

#endif