diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2021-12-18 22:34:04 -0600 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2021-12-18 22:34:04 -0600 |
| commit | b0e9f8dbe57df5e688d9583987d7e378eebd72b4 (patch) | |
| tree | 18824b6a05fddfa71e4c1240023fc916d8ef4790 /src/aoevidencebutton.cpp | |
| parent | cf12168ebd426d7658d7f7021c47be519caa215a (diff) | |
| parent | 641cca65044e41e49e5a871f0d60138b61c1bab3 (diff) | |
Merge branch 'master' into feature/http-ms
Diffstat (limited to 'src/aoevidencebutton.cpp')
| -rw-r--r-- | src/aoevidencebutton.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/aoevidencebutton.cpp b/src/aoevidencebutton.cpp index fee7327..800c8b4 100644 --- a/src/aoevidencebutton.cpp +++ b/src/aoevidencebutton.cpp @@ -27,12 +27,12 @@ AOEvidenceButton::AOEvidenceButton(QWidget *p_parent, AOApplication *p_ao_app, this->resize(p_w, p_h); // this->setAcceptDrops(true); - connect(this, SIGNAL(clicked()), this, SLOT(on_clicked())); + connect(this, &AOEvidenceButton::clicked, this, &AOEvidenceButton::on_clicked); } void AOEvidenceButton::set_image(QString p_image) { - QString image_path = ao_app->get_evidence_path(p_image); + QString image_path = ao_app->get_real_path(ao_app->get_evidence_path(p_image)); if (file_exists(p_image)) { this->setText(""); this->setStyleSheet( @@ -57,8 +57,10 @@ void AOEvidenceButton::set_image(QString p_image) void AOEvidenceButton::set_theme_image(QString p_image) { - QString theme_image_path = ao_app->get_theme_path(p_image); - QString default_image_path = ao_app->get_theme_path(p_image, ao_app->default_theme); + QString theme_image_path = ao_app->get_real_path( + ao_app->get_theme_path(p_image)); + QString default_image_path = ao_app->get_real_path( + ao_app->get_theme_path(p_image, ao_app->default_theme)); QString final_image_path; @@ -78,12 +80,12 @@ void AOEvidenceButton::set_selected(bool p_selected) ui_selected->hide(); } -void AOEvidenceButton::on_clicked() { evidence_clicked(m_id); } +void AOEvidenceButton::on_clicked() { emit evidence_clicked(m_id); } void AOEvidenceButton::mouseDoubleClickEvent(QMouseEvent *e) { QPushButton::mouseDoubleClickEvent(e); - evidence_double_clicked(m_id); + emit evidence_double_clicked(m_id); } /* @@ -106,7 +108,7 @@ void AOEvidenceButton::enterEvent(QEvent *e) { ui_selector->show(); - on_hover(m_id, true); + emit on_hover(m_id, true); setFlat(false); QPushButton::enterEvent(e); @@ -116,6 +118,6 @@ void AOEvidenceButton::leaveEvent(QEvent *e) { ui_selector->hide(); - on_hover(m_id, false); + emit on_hover(m_id, false); QPushButton::leaveEvent(e); } |
