-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAddTagToNoteDialog.h
48 lines (39 loc) · 1.21 KB
/
AddTagToNoteDialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef ADDTAGTONOTEDIALOG_H
#define ADDTAGTONOTEDIALOG_H
#include <QDialog>
#include <QListWidgetItem>
#include "NotesManager.h"
#include "TagManager.h"
class Tag;
namespace Ui {
class AddTagToNoteDialog;
}
/*!
* \brief The QListWidgetItemWithpTag class Cette classe hérite de la classe \link<QListWidgetItem> qui fournit un accesseur au \link<Tag> associé.
*/
class QListWidgetItemWithpTag : public QListWidgetItem{
Tag *ressource;
public:
QListWidgetItemWithpTag(const QString & text, Tag* tag, QListWidget * parent = 0, int type = Type)
:QListWidgetItem(text, parent, type), ressource(tag){}
Tag *getRessource() const {return ressource;}
void setRessource(Tag *value) {ressource = value;}
};
/*!
* \brief The AddTagToNoteDialog class Cette classe permet de récupérer les tags activés après sa fermeture.
*/
class AddTagToNoteDialog : public QDialog
{
Q_OBJECT
QSet<Tag *> *activatedTags;
TagManager *tm;
public:
explicit AddTagToNoteDialog(Note *n, QWidget *parent = 0);
~AddTagToNoteDialog();
QSet<Tag *> *getTags();
private:
Ui::AddTagToNoteDialog *ui;
public slots:
void STOCK_ACTIVATED_TAGS(QListWidgetItem *item);
};
#endif // ADDTAGTONOTEDIALOG_H