2013-08-09 06:57:18 +02:00
|
|
|
#ifndef LC_QEDITGROUPSDIALOG_H
|
|
|
|
#define LC_QEDITGROUPSDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
struct lcEditGroupsDialogOptions;
|
|
|
|
class Group;
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class lcQEditGroupsDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class lcQEditGroupsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit lcQEditGroupsDialog(QWidget *parent, void *data);
|
|
|
|
~lcQEditGroupsDialog();
|
|
|
|
|
|
|
|
lcEditGroupsDialogOptions *options;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PieceRole = Qt::UserRole,
|
2013-12-13 23:27:57 +01:00
|
|
|
GroupRole
|
2013-08-09 06:57:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void accept();
|
|
|
|
void on_newGroup_clicked();
|
2013-12-13 23:27:57 +01:00
|
|
|
void onItemClicked(QTreeWidgetItem *item, int col);
|
|
|
|
void onItemDoubleClicked(QTreeWidgetItem *item, int col);
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::lcQEditGroupsDialog *ui;
|
|
|
|
|
|
|
|
void updateParents(QTreeWidgetItem *parentItem, Group *parentGroup);
|
|
|
|
void addChildren(QTreeWidgetItem *parentItem, Group *parentGroup);
|
2013-12-13 23:27:57 +01:00
|
|
|
|
|
|
|
void timerEvent(QTimerEvent *event);
|
|
|
|
|
|
|
|
QTreeWidgetItem* m_lastItemClicked;
|
|
|
|
bool m_editableDoubleClicked;
|
|
|
|
QBasicTimer m_clickTimer;
|
2013-08-09 06:57:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LC_QEDITGROUPSDIALOG_H
|