Code Documentation 3.5
Social Network Visualizer
Loading...
Searching...
No Matches
dialogedgeedit.h
Go to the documentation of this file.
1
16#ifndef DIALOGEDGEEDIT_H
17#define DIALOGEDGEEDIT_H
18
19#include <QDialog>
20#include <QHash>
21#include <QColor>
22#include <QPixmap>
23
24namespace Ui
25{
26 class DialogEdgeEdit;
27}
28
29class DialogEdgeEdit : public QDialog
30{
31 Q_OBJECT
32public:
33 explicit DialogEdgeEdit(QWidget *parent,
34 const int &v1,
35 const int &v2,
36 const QString &label,
37 const double &weight,
38 const QColor &color,
39 const QHash<QString,QString> &customAttributes = QHash<QString,QString>());
41
42private slots:
43 void getUserChoices();
44 void selectColor();
47
48signals:
49 void userChoices(const QString &label,
50 const double &weight,
51 const QColor &color,
52 const QHash<QString,QString> &customAttributes);
53
54private:
55 Ui::DialogEdgeEdit *ui;
56 int m_v1, m_v2;
57 QString m_label;
58 double m_weight;
59 QColor m_color;
60 QHash<QString,QString> m_customAttributes;
61 QPixmap m_pixmap;
62};
63
64#endif
Definition dialogedgeedit.h:30
void getUserChoices()
Collects all field values and emits userChoices().
Definition dialogedgeedit.cpp:153
QString m_label
Definition dialogedgeedit.h:57
void on_removePropertyBtn_clicked()
Removes the selected row from the attributes table.
Definition dialogedgeedit.cpp:139
void userChoices(const QString &label, const double &weight, const QColor &color, const QHash< QString, QString > &customAttributes)
QColor m_color
Definition dialogedgeedit.h:59
QPixmap m_pixmap
Definition dialogedgeedit.h:61
void selectColor()
Opens a color picker and updates the color button icon.
Definition dialogedgeedit.cpp:91
int m_v1
Definition dialogedgeedit.h:56
double m_weight
Definition dialogedgeedit.h:58
QHash< QString, QString > m_customAttributes
Definition dialogedgeedit.h:60
void on_addPropertyBtn_clicked()
Adds a key/value pair from the input fields to the attributes table.
Definition dialogedgeedit.cpp:104
~DialogEdgeEdit()
Definition dialogedgeedit.cpp:83
Ui::DialogEdgeEdit * ui
Definition dialogedgeedit.h:55
int m_v2
Definition dialogedgeedit.h:56
Definition dialogedgeedit.h:25