dialogList.h 963 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>

Sylvain Thery's avatar
Sylvain Thery committed
10 11 12 13 14 15 16
#ifdef WIN32
#if defined SCHNAPPSLIB_DLL_EXPORT
#define SCHNAPPS_API __declspec(dllexport)
#else
#define SCHNAPPS_API __declspec(dllimport)
#endif
#endif
Sylvain Thery's avatar
Sylvain Thery committed
17 18 19 20 21 22 23

namespace CGoGN
{

namespace SCHNApps
{

Sylvain Thery's avatar
Sylvain Thery committed
24
class SCHNAPPS_API ListPopUp : public QDialog
Sylvain Thery's avatar
Sylvain Thery committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
{
	Q_OBJECT
	QVBoxLayout* m_layout;
	QListWidget* m_list_items;


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

	virtual ~ListPopUp();

	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);

};



} // namespace SCHNApps

} // namespace CGoGN

#endif