2 Copyright 2014 Marten Richter
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "wmovieview.h"
26 WMovieView::WMovieView(MovieInfo* movie):
29 // portions from nopacity plugin by Louis Braun
32 std::stringstream info;
33 info << tr("TheMovieDB Information") << ":\n\n";
34 if (!movie->originalTitle.empty()){
35 info << tr("Original Title") << ": " << movie->originalTitle << "\n\n";
37 if (!movie->tagline.empty()){
38 info << tr("Tagline") << ": " << movie->tagline << "\n\n";
40 if (!movie->overview.empty()){
41 info << tr("Overview") << ": " << movie->overview << "\n\n";
43 const char* strAdult = (movie->adult)?(tr("yes")):(tr("no"));
44 info << tr("Adult") << ": " << strAdult << "\n\n";
45 if (!movie->collectionName.empty()){
46 info << tr("Collection") << ": " << movie->collectionName << "\n\n";
48 if (movie->budget > 0 ){
49 info << tr("Budget") << ": " << movie->budget << "$\n\n";
51 if (movie->revenue > 0 ){
52 info << tr("Revenue") << ": " << movie->revenue << "$\n\n";
54 if (!movie->genres.empty() ){
55 info << tr("Genre") << ": " << movie->genres << "\n\n";
57 if (!movie->homepage.empty()){
58 info << tr("Homepage") << ": " << movie->homepage << "\n\n";
60 if (!movie->releaseDate.empty()){
61 info << tr("Release Date") << ": " << movie->releaseDate << "\n\n";
63 if (movie->runtime > 0 ){
64 info << tr("Runtime") << ": " << movie->runtime << " " << tr("minutes") << "\n\n";
66 if (movie->popularity > 0 ){
67 info << tr("TheMovieDB Popularity") << ": " << movie->popularity << "\n\n";
69 if (movie->voteAverage > 0 ){
70 info << tr("TheMovieDB Vote Average") << ": " << movie->voteAverage << "\n\n";
72 setText(info.str().c_str());
74 setText("This is a bug!");
79 void WMovieView::draw()