diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2020-05-22 17:13:17 -0500 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2020-05-22 17:13:37 -0500 |
| commit | 8928aa2718378bc42d20d5bbe6c17be68d65d6f3 (patch) | |
| tree | bf90d3e73519d58cc89e2135b613e308ac0a0ed8 /src/aoevidencedisplay.cpp | |
| parent | 156a760ebab6839c53f9c613881f0937e814414a (diff) | |
Perform clang-format
If you don't want to see this commit on blames, use the hidden
whitespace option on GitHub, or use `-w` in git-blame.
Diffstat (limited to 'src/aoevidencedisplay.cpp')
| -rw-r--r-- | src/aoevidencedisplay.cpp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/src/aoevidencedisplay.cpp b/src/aoevidencedisplay.cpp index 9ec105dd..9dd062b7 100644 --- a/src/aoevidencedisplay.cpp +++ b/src/aoevidencedisplay.cpp @@ -1,10 +1,11 @@ #include "aoevidencedisplay.h" -#include "file_functions.h" #include "datatypes.h" +#include "file_functions.h" #include "misc_functions.h" -AOEvidenceDisplay::AOEvidenceDisplay(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_parent) +AOEvidenceDisplay::AOEvidenceDisplay(QWidget *p_parent, AOApplication *p_ao_app) + : QLabel(p_parent) { ao_app = p_ao_app; @@ -12,10 +13,12 @@ AOEvidenceDisplay::AOEvidenceDisplay(QWidget *p_parent, AOApplication *p_ao_app) evidence_icon = new QLabel(this); sfx_player = new AOSfxPlayer(this, ao_app); - connect(evidence_movie, SIGNAL(frameChanged(int)), this, SLOT(frame_change(int))); + connect(evidence_movie, SIGNAL(frameChanged(int)), this, + SLOT(frame_change(int))); } -void AOEvidenceDisplay::show_evidence(QString p_evidence_image, bool is_left_side, int p_volume) +void AOEvidenceDisplay::show_evidence(QString p_evidence_image, + bool is_left_side, int p_volume) { this->reset(); @@ -29,23 +32,23 @@ void AOEvidenceDisplay::show_evidence(QString p_evidence_image, bool is_left_sid QString gif_name; QString icon_identifier; - if (is_left_side) - { + if (is_left_side) { icon_identifier = "left_evidence_icon"; gif_name = "evidence_appear_left.gif"; } - else - { + else { icon_identifier = "right_evidence_icon"; gif_name = "evidence_appear_right.gif"; } - pos_size_type icon_dimensions = ao_app->get_element_dimensions(icon_identifier, "courtroom_design.ini"); + pos_size_type icon_dimensions = + ao_app->get_element_dimensions(icon_identifier, "courtroom_design.ini"); evidence_icon->move(icon_dimensions.x, icon_dimensions.y); evidence_icon->resize(icon_dimensions.width, icon_dimensions.height); - evidence_icon->setPixmap(f_pixmap.scaled(evidence_icon->width(), evidence_icon->height(), Qt::IgnoreAspectRatio)); + evidence_icon->setPixmap(f_pixmap.scaled( + evidence_icon->width(), evidence_icon->height(), Qt::IgnoreAspectRatio)); QString f_default_gif_path = ao_app->get_default_theme_path(gif_name); QString f_gif_path = ao_app->get_theme_path(gif_name); @@ -57,7 +60,7 @@ void AOEvidenceDisplay::show_evidence(QString p_evidence_image, bool is_left_sid evidence_movie->setFileName(final_gif_path); - if(evidence_movie->frameCount() < 1) + if (evidence_movie->frameCount() < 1) return; this->setMovie(evidence_movie); @@ -68,9 +71,8 @@ void AOEvidenceDisplay::show_evidence(QString p_evidence_image, bool is_left_sid void AOEvidenceDisplay::frame_change(int p_frame) { - if (p_frame == (evidence_movie->frameCount() - 1)) - { - //we need this or else the last frame wont show + if (p_frame == (evidence_movie->frameCount() - 1)) { + // we need this or else the last frame wont show delay(evidence_movie->nextFrameDelay()); evidence_movie->stop(); @@ -88,9 +90,4 @@ void AOEvidenceDisplay::reset() this->clear(); } -QLabel* AOEvidenceDisplay::get_evidence_icon() -{ - return evidence_icon; -} - - +QLabel *AOEvidenceDisplay::get_evidence_icon() { return evidence_icon; } |
