Ticket #6706: mythgame.plot.screenshotbrowser.diff
File mythgame.plot.screenshotbrowser.diff, 31.1 KB (added by , 15 years ago) |
---|
-
mythgame/theme/default/game-ui.xml
76 76 <font>infofont</font> 77 77 </textarea> 78 78 79 <textarea name="plot"> 80 <area>38,565,500,35</area> 81 <font>infofont</font> 82 </textarea> 83 79 84 <imagetype name="gameimage"> 80 85 <area>600,420,180,150</area> 81 86 </imagetype> … … 99 104 <!-- Labels --> 100 105 101 106 <textarea name="gamename_label" from="basetextarea"> 102 <area>25 0,110,250,40</area>107 <area>25,110,250,40</area> 103 108 <value>Game Name:</value> 104 109 <align>right,top</align> 105 110 </textarea> 106 111 107 112 <textarea name="genre_label" from="basetextarea"> 108 <area>25 0,155,250,40</area>113 <area>25,155,250,40</area> 109 114 <value>Genre:</value> 110 115 <align>right,top</align> 111 116 </textarea> 112 117 113 118 <textarea name="year_label" from="basetextarea"> 114 <area>25 0,200,250,40</area>119 <area>25,200,250,40</area> 115 120 <value>Year:</value> 116 121 <align>right,top</align> 117 122 </textarea> 118 123 119 124 <textarea name="country_label" from="basetextarea"> 120 <area>25 0,245,250,40</area>125 <area>25,245,250,40</area> 121 126 <value>Country:</value> 122 127 <align>right,top</align> 123 128 </textarea> 124 129 125 130 <textarea name="publisher_label" from="basetextarea"> 126 <area>25 0,290,250,40</area>131 <area>25,290,250,40</area> 127 132 <value>Publisher:</value> 128 133 <align>right,top</align> 129 134 </textarea> 130 135 136 <textarea name="plot_label" from="basetextarea"> 137 <area>25,335,250,40</area> 138 <value>Plot:</value> 139 <align>right,top</align> 140 </textarea> 141 131 142 <textarea name="favorite_label" from="basetextarea"> 132 <area>25 0,335,250,40</area>143 <area>25,385,250,40</area> 133 144 <value>Favorite:</value> 134 145 <align>right,top</align> 135 146 </textarea> 136 147 148 <textarea name="screenshot_label" from="basetextarea"> 149 <area>25,430,250,40</area> 150 <value>Screenshot:</value> 151 <align>right,top</align> 152 </textarea> 153 137 154 <textarea name="fanart_label" from="basetextarea"> 138 <area>25 0,380,250,40</area>155 <area>25,475,250,40</area> 139 156 <value>Fanart:</value> 140 157 <align>right,top</align> 141 158 </textarea> 142 159 143 160 <textarea name="boxart_label" from="basetextarea"> 144 <area>25 0,425,250,40</area>161 <area>25,520,250,40</area> 145 162 <value>Boxart:</value> 146 163 <align>right,top</align> 147 164 </textarea> … … 149 166 <!-- Widgets --> 150 167 151 168 <textedit name="gamename_edit" from="basetextedit"> 152 <position> 510,100</position>169 <position>285,100</position> 153 170 </textedit> 154 171 155 172 <textedit name="genre_edit" from="basetextedit"> 156 <position> 510,145</position>173 <position>285,145</position> 157 174 </textedit> 158 175 159 176 <textedit name="year_edit" from="basetextedit"> 160 <position> 510,190</position>177 <position>285,190</position> 161 178 </textedit> 162 179 163 180 <textedit name="country_edit" from="basetextedit"> 164 <position> 510,235</position>181 <position>285,235</position> 165 182 </textedit> 166 183 167 184 <textedit name="publisher_edit" from="basetextedit"> 168 <position> 510,280</position>185 <position>285,280</position> 169 186 </textedit> 170 187 188 <textedit name="plot_edit" from="basetextedit"> 189 <position>285,325</position> 190 </textedit> 191 171 192 <checkbox name="favorite_check" from="basecheckbox"> 172 <position> 510,330</position>193 <position>285,380</position> 173 194 </checkbox> 174 195 196 <button name="screenshot_button" from="basesearchbutton"> 197 <position>285,420</position> 198 </button> 199 200 <textarea name="screenshot_text" from="basetextarea"> 201 <area>325,425,250,40</area> 202 <value>/path/to/the/thing.jpg</value> 203 </textarea> 204 175 205 <button name="fanart_button" from="basesearchbutton"> 176 <position> 510,370</position>206 <position>285,465</position> 177 207 </button> 178 208 179 209 <textarea name="fanart_text" from="basetextarea"> 180 <area> 550,375,250,40</area>210 <area>325,470,250,40</area> 181 211 <value>/path/to/the/thing.jpg</value> 182 212 </textarea> 183 213 184 214 <button name="boxart_button" from="basesearchbutton"> 185 <position> 510,415</position>215 <position>285,510</position> 186 216 </button> 187 217 188 218 <textarea name="boxart_text" from="basetextarea"> 189 <area> 550,420,250,40</area>219 <area>325,515,250,40</area> 190 220 <value>/path/to/the/thing.jpg</value> 191 221 </textarea> 192 222 193 223 <button name="done_button" from="basebutton"> 194 <position> 510,565</position>224 <position>285,565</position> 195 225 <value>Done</value> 196 226 </button> 197 227 … … 303 333 <area>190,420,400,40</area> 304 334 </textarea> 305 335 336 <textarea name="plot" from="basetextarea"> 337 <area>40,470,640,40</area> 338 <value>No Plot.</value> 339 <align>left</align> 340 </textarea> 341 306 342 <imagetype name="boxart"> 307 343 <area>600,300,180,150</area> 308 344 <preserveaspect>true</preserveaspect> -
mythgame/theme/default-wide/game-ui.xml
76 76 <font>infofont</font> 77 77 </textarea> 78 78 79 <textarea name="plot"> 80 <area>236,665,580,35</area> 81 <font>infofont</font> 82 </textarea> 83 79 84 <imagetype name="boxart"> 80 85 <area>610,500,180,150</area> 81 86 <preserveaspect>true</preserveaspect> … … 200 205 <area>190,520,400,40</area> 201 206 </textarea> 202 207 208 <textarea name="plot" from="basetextarea"> 209 <area>190,560,400,40</area> 210 </textarea> 211 203 212 <imagetype name="boxart"> 204 213 <area>800,200,415,320</area> 205 214 <preserveaspect>true</preserveaspect> … … 258 267 <align>right,top</align> 259 268 </textarea> 260 269 261 <textarea name=" favorite_label" from="basetextarea">270 <textarea name="plot_label" from="basetextarea"> 262 271 <area>250,335,250,40</area> 272 <value>Plot:</value> 273 <align>right,top</align> 274 </textarea> 275 276 <textarea name="fav_label" from="basetextarea"> 277 <area>250,400,250,40</area> 263 278 <value>Favorite:</value> 264 279 <align>right,top</align> 265 280 </textarea> 266 281 282 <textarea name="screenshot_label" from="basetextarea"> 283 <area>250,445,250,40</area> 284 <value>Screenshot:</value> 285 <align>right,top</align> 286 </textarea> 287 267 288 <textarea name="fanart_label" from="basetextarea"> 268 <area>250, 380,250,40</area>289 <area>250,490,250,40</area> 269 290 <value>Fanart:</value> 270 291 <align>right,top</align> 271 292 </textarea> 272 293 273 294 <textarea name="boxart_label" from="basetextarea"> 274 <area>250, 425,250,40</area>295 <area>250,535,250,40</area> 275 296 <value>Boxart:</value> 276 297 <align>right,top</align> 277 298 </textarea> … … 298 319 <position>510,280</position> 299 320 </textedit> 300 321 322 <textedit name="plot_edit" from="basetextedit"> 323 <position>510,325</position> 324 </textedit> 325 301 326 <checkbox name="favorite_check" from="basecheckbox"> 302 <position>510, 330</position>327 <position>510,400</position> 303 328 </checkbox> 304 329 330 <button name="screenshot_button" from="basesearchbutton"> 331 <position>510,445</position> 332 </button> 333 334 <textarea name="screenshot_text" from="basetextarea"> 335 <area>550,440,750,40</area> 336 <value>/path/to/the/thing.jpg</value> 337 </textarea> 338 305 339 <button name="fanart_button" from="basesearchbutton"> 306 <position>510, 370</position>340 <position>510,480</position> 307 341 </button> 308 342 309 343 <textarea name="fanart_text" from="basetextarea"> 310 <area>550, 375,750,40</area>344 <area>550,485,750,40</area> 311 345 <value>/path/to/the/thing.jpg</value> 312 346 </textarea> 313 347 314 348 <button name="boxart_button" from="basesearchbutton"> 315 <position>510, 415</position>349 <position>510,525</position> 316 350 </button> 317 351 318 352 <textarea name="boxart_text" from="basetextarea"> 319 <area>550, 420,750,40</area>353 <area>550,530,750,40</area> 320 354 <value>/path/to/the/thing.jpg</value> 321 355 </textarea> 322 356 323 357 <button name="done_button" from="basebutton"> 324 <position>510, 565</position>358 <position>510,615</position> 325 359 <value>Done</value> 326 360 </button> 327 361 -
mythgame/mythgame/romedit.cpp
18 18 EditRomInfoDialog::EditRomInfoDialog(MythScreenStack *parent, 19 19 QString name, RomInfo *romInfo) : MythScreenType(parent, name), 20 20 m_id(""), m_retObject(0), m_gamenameEdit(0), m_genreEdit(0), 21 m_yearEdit(0), m_countryEdit(0), m_p ublisherEdit(0), m_favoriteCheck(0),22 m_fa nartButton(0), m_fanartText(0), m_boxartButton(0), m_boxartText(0),23 m_ doneButton(0)21 m_yearEdit(0), m_countryEdit(0), m_plotEdit(0), m_publisherEdit(0), 22 m_favoriteCheck(0), m_screenshotButton(0), m_fanartButton(0), 23 m_fanartText(0), m_boxartButton(0), m_boxartText(0), m_doneButton(0) 24 24 { 25 25 m_workingRomInfo = new RomInfo(*romInfo); 26 26 } … … 40 40 UIUtilE::Assign(this, m_genreEdit, "genre_edit", &err); 41 41 UIUtilE::Assign(this, m_yearEdit, "year_edit", &err); 42 42 UIUtilE::Assign(this, m_countryEdit, "country_edit", &err); 43 UIUtilE::Assign(this, m_plotEdit, "plot_edit", &err); 43 44 UIUtilE::Assign(this, m_publisherEdit, "publisher_edit", &err); 44 45 45 46 UIUtilE::Assign(this, m_favoriteCheck, "favorite_check", &err); 46 47 48 UIUtilE::Assign(this, m_screenshotButton, "screenshot_button", &err); 49 UIUtilE::Assign(this, m_screenshotText, "screenshot_text", &err); 47 50 UIUtilE::Assign(this, m_fanartButton, "fanart_button", &err); 48 51 UIUtilE::Assign(this, m_fanartText, "fanart_text", &err); 49 52 UIUtilE::Assign(this, m_boxartButton, "boxart_button", &err); … … 66 69 connect(m_genreEdit, SIGNAL(valueChanged()), SLOT(SetGenre())); 67 70 connect(m_yearEdit, SIGNAL(valueChanged()), SLOT(SetYear())); 68 71 connect(m_countryEdit, SIGNAL(valueChanged()), SLOT(SetCountry())); 72 connect(m_plotEdit, SIGNAL(valueChanged()), SLOT(SetPlot())); 69 73 connect(m_publisherEdit, SIGNAL(valueChanged()), SLOT(SetPublisher())); 70 74 71 75 connect(m_favoriteCheck, SIGNAL(valueChanged()), SLOT(ToggleFavorite())); 72 76 77 connect(m_screenshotButton, SIGNAL(Clicked()), SLOT(FindScreenshot())); 73 78 connect(m_fanartButton, SIGNAL(Clicked()), SLOT(FindFanart())); 74 79 connect(m_boxartButton, SIGNAL(Clicked()), SLOT(FindBoxart())); 75 80 … … 112 117 delete fb; 113 118 } 114 119 120 const QString CEID_SCREENSHOTFILE = "screenshotfile"; 115 121 const QString CEID_FANARTFILE = "fanartfile"; 116 122 const QString CEID_BOXARTFILE = "boxartfile"; 117 123 } … … 130 136 131 137 if (resultid == CEID_FANARTFILE) 132 138 SetFanart(dce->GetResultText()); 139 else if (resultid == CEID_SCREENSHOTFILE) 140 SetScreenshot(dce->GetResultText()); 133 141 else if (resultid == CEID_BOXARTFILE) 134 142 SetBoxart(dce->GetResultText()); 135 143 } … … 141 149 m_genreEdit->SetText(m_workingRomInfo->Genre()); 142 150 m_yearEdit->SetText(m_workingRomInfo->Year()); 143 151 m_countryEdit->SetText(m_workingRomInfo->Country()); 152 m_plotEdit->SetText(m_workingRomInfo->Plot()); 144 153 m_publisherEdit->SetText(m_workingRomInfo->Publisher()); 145 154 146 155 if (m_workingRomInfo->Favorite()) 147 156 m_favoriteCheck->SetCheckState(MythUIStateType::Full); 148 157 158 m_screenshotText->SetText(m_workingRomInfo->Screenshot()); 149 159 m_fanartText->SetText(m_workingRomInfo->Fanart()); 150 160 m_boxartText->SetText(m_workingRomInfo->Boxart()); 151 161 } … … 191 201 m_workingRomInfo->setCountry(m_countryEdit->GetText()); 192 202 } 193 203 204 void EditRomInfoDialog::SetPlot() 205 { 206 m_workingRomInfo->setPlot(m_plotEdit->GetText()); 207 } 208 194 209 void EditRomInfoDialog::SetPublisher() 195 210 { 196 211 m_workingRomInfo->setPublisher(m_publisherEdit->GetText()); … … 201 216 m_workingRomInfo->setFavorite(); 202 217 } 203 218 219 void EditRomInfoDialog::FindScreenshot() 220 { 221 FindImagePopup(gContext->GetSetting("mythgame.screenshotDir"), 222 GetConfDir() + "/MythGame/Screenshots", 223 *this, CEID_SCREENSHOTFILE); 224 } 225 204 226 void EditRomInfoDialog::FindFanart() 205 227 { 206 228 FindImagePopup(gContext->GetSetting("mythgame.fanartDir"), … … 215 237 *this, CEID_BOXARTFILE); 216 238 } 217 239 240 void EditRomInfoDialog::SetScreenshot(QString file) 241 { 242 if (file.isEmpty()) 243 return; 244 245 m_workingRomInfo->setScreenshot(file); 246 m_screenshotText->SetText(file); 247 } 248 218 249 void EditRomInfoDialog::SetFanart(QString file) 219 250 { 220 251 if (file.isEmpty()) -
mythgame/mythgame/gamehandler.cpp
114 114 115 115 MSqlQuery query(MSqlQuery::InitCon()); 116 116 query.prepare("SELECT crc, category, year, country, name, " 117 "description, p ublisher, platform, version, "117 "description, plot, publisher, platform, version, " 118 118 "binfile FROM romdb WHERE platform = :GAMETYPE;"); 119 119 120 120 query.bindValue(":GAMETYPE",GameType); … … 149 149 150 150 void GameHandler::GetMetadata(GameHandler *handler, QString rom, QString* Genre, QString* Year, 151 151 QString* Country, QString* CRC32, QString* GameName, 152 QString *P ublisher, QString *Version, QString* Fanart,153 QString* Boxart)152 QString *Plot, QString *Publisher, QString *Version, 153 QString* Fanart, QString* Boxart) 154 154 { 155 155 QString key; 156 156 QString tmpcrc; … … 164 164 *Country = QObject::tr("Unknown"); 165 165 *GameName = QObject::tr("Unknown"); 166 166 *Genre = QObject::tr("Unknown"); 167 *Plot = QObject::tr("Unknown"); 167 168 *Publisher = QObject::tr("Unknown"); 168 169 *Version = QObject::tr("0"); 169 170 *Fanart = QObject::tr(""); … … 412 413 QString thequery; 413 414 QString queryvalues; 414 415 QString Year; 416 QString Plot; 415 417 QString Publisher; 416 418 QString Version; 417 419 QString Fanart; … … 428 430 if (indepth) 429 431 { 430 432 GetMetadata(handler, iter.data().RomFullPath(), &Genre, &Year, &Country, &CRC32, &GameName, 431 &P ublisher, &Version, &Fanart, &Boxart);433 &Plot, &Publisher, &Version, &Fanart, &Boxart); 432 434 } 433 435 else 434 436 { … … 437 439 CRC32 = ""; 438 440 Year = QObject::tr("19xx"); 439 441 GameName = QObject::tr("Unknown"); 442 Plot = QObject::tr("Unknown"); 440 443 Publisher = QObject::tr("Unknown"); 441 444 Version = QObject::tr("0"); 442 445 Fanart = QObject::tr(""); … … 452 455 VERBOSE(VB_GENERAL, QString("file %1 - genre %2 ").arg(iter.data().Rom()).arg(Genre)); 453 456 query.prepare("INSERT INTO gamemetadata " 454 457 "(system, romname, gamename, genre, year, gametype, " 455 "rompath, country, crc_value, diskcount, display, "458 "rompath, country, crc_value, diskcount, display, plot, " 456 459 "publisher, version, fanart, boxart) " 457 460 "VALUES (:SYSTEM, :ROMNAME, :GAMENAME, :GENRE, :YEAR, " 458 ":GAMETYPE, :ROMPATH, :COUNTRY, :CRC32, '1', '1', :P UBLISHER, :VERSION, "461 ":GAMETYPE, :ROMPATH, :COUNTRY, :CRC32, '1', '1', :PLOT, :PUBLISHER, :VERSION, " 459 462 ":FANART, BOXART)"); 460 463 461 464 … … 469 472 query.bindValue(":ROMPATH",iter.data().RomPath()); 470 473 query.bindValue(":COUNTRY",Country); 471 474 query.bindValue(":CRC32", CRC32); 475 query.bindValue(":PLOT", Plot); 472 476 query.bindValue(":PUBLISHER", Publisher); 473 477 query.bindValue(":VERSION", Version); 474 478 query.bindValue(":FANART", Fanart); -
mythgame/mythgame/gameui.cpp
53 53 UIUtilE::Assign(this, m_gameYear, "yearname", &err); 54 54 UIUtilE::Assign(this, m_gameGenre, "genrename", &err); 55 55 UIUtilE::Assign(this, m_gameFavourite, "showfavorite", &err); 56 UIUtilE::Assign(this, m_gamePlot, "plot", &err); 56 57 UIUtilE::Assign(this, m_gameImage, "gameimage", &err); 57 58 UIUtilE::Assign(this, m_fanartImage, "fanart", &err); 58 59 UIUtilE::Assign(this, m_boxImage, "boxart", &err); … … 294 295 m_gameSystem->SetText(rom->System()); 295 296 m_gameYear->SetText(rom->Year()); 296 297 m_gameGenre->SetText(rom->Genre()); 298 m_gamePlot->SetText(rom->Plot()); 297 299 298 300 if (rom->Favorite()) 299 301 m_gameFavourite->SetText("Yes"); 300 302 else 301 303 m_gameFavourite->SetText("No"); 302 304 303 m_gameImage->SetFilename(rom-> ImagePath());305 m_gameImage->SetFilename(rom->Screenshot()); 304 306 m_fanartImage->SetFilename(rom->Fanart()); 305 307 m_boxImage->SetFilename(rom->Boxart()); 306 308 } … … 310 312 m_gameSystem->SetText(""); 311 313 m_gameYear->SetText(""); 312 314 m_gameGenre->SetText(""); 315 m_gamePlot->SetText(""); 313 316 m_gameFavourite->SetText(""); 314 317 315 318 if (m_gameImage->IsVisible()) … … 553 556 filter += conj + "trim(genre)=:GENRE"; 554 557 conj = " and "; 555 558 } 559 if (!romInfo->Plot().isEmpty()) 560 { 561 filter += conj + "plot=:PLOT"; 562 conj = " and "; 563 } 556 564 if (!romInfo->Publisher().isEmpty()) 557 565 { 558 566 filter += conj + "publisher=:PUBLISHER"; 559 567 conj = " and "; 560 568 } 561 562 569 if (!romInfo->Gamename().isEmpty()) 563 570 { 564 571 filter += conj + "trim(gamename)=:GAMENAME"; … … 650 657 query.bindValue(":YEAR", romInfo->Year()); 651 658 if (!romInfo->Genre().isEmpty()) 652 659 query.bindValue(":GENRE", romInfo->Genre()); 660 if (!romInfo->Plot().isEmpty()) 661 query.bindValue(":PLOT", romInfo->Plot()); 653 662 if (!romInfo->Publisher().isEmpty()) 654 663 query.bindValue(":PUBLISHER", romInfo->Publisher()); 655 664 if (!romInfo->Gamename().isEmpty()) -
mythgame/mythgame/romedit.h
25 25 void SetGenre(); 26 26 void SetYear(); 27 27 void SetCountry(); 28 void SetPlot(); 28 29 void SetPublisher(); 29 30 void ToggleFavorite(); 31 void FindScreenshot(); 30 32 void FindFanart(); 31 33 void FindBoxart(); 32 34 void SaveAndExit(); 33 35 34 36 private: 35 37 void fillWidgets(); 38 void SetScreenshot(QString file); 36 39 void SetFanart(QString file); 37 40 void SetBoxart(QString file); 38 41 … … 45 48 MythUITextEdit *m_genreEdit; 46 49 MythUITextEdit *m_yearEdit; 47 50 MythUITextEdit *m_countryEdit; 51 MythUITextEdit *m_plotEdit; 48 52 MythUITextEdit *m_publisherEdit; 49 53 MythUICheckBox *m_favoriteCheck; 54 MythUIButton *m_screenshotButton; 55 MythUIText *m_screenshotText; 50 56 MythUIButton *m_fanartButton; 51 57 MythUIText *m_fanartText; 52 58 MythUIButton *m_boxartButton; -
mythgame/mythgame/rominfo.cpp
19 19 void RomInfo::UpdateDatabase() 20 20 { 21 21 MSqlQuery query(MSqlQuery::InitCon()); 22 query.prepare("SELECT gamename,genre,year,country,p ublisher,favorite,"23 "fa nart,boxart "22 query.prepare("SELECT gamename,genre,year,country,plot,publisher, " 23 "favorite,screenshot,fanart,boxart " 24 24 "FROM gamemetadata " 25 25 "WHERE gametype = :GAMETYPE " 26 26 "AND romname = :ROMNAME"); … … 41 41 QString t_genre = query.value(1).toString(); 42 42 QString t_year = query.value(2).toString(); 43 43 QString t_country = query.value(3).toString(); 44 QString t_publisher = query.value(4).toString(); 45 bool t_favourite = query.value(5).toBool(); 46 QString t_fanart = query.value(6).toString(); 47 QString t_boxart = query.value(7).toString(); 44 QString t_plot = query.value(4).toString(); 45 QString t_publisher = query.value(5).toString(); 46 bool t_favourite = query.value(6).toBool(); 47 QString t_screenshot = query.value(7).toString(); 48 QString t_fanart = query.value(8).toString(); 49 QString t_boxart = query.value(9).toString(); 48 50 49 51 if ((t_gamename != Gamename()) || (t_genre != Genre()) || 50 52 (t_year != Year()) || (t_country != Country()) || 51 (t_publisher != Publisher()) || (t_favourite != Favorite()) || 53 (t_plot != Plot()) || (t_publisher != Publisher()) || 54 (t_favourite != Favorite()) || (t_screenshot != Screenshot()) || 52 55 (t_fanart != Fanart()) || (t_boxart != Boxart())) 53 56 { 54 57 query.prepare("UPDATE gamemetadata " … … 57 60 " genre = :GENRE," 58 61 " year = :YEAR," 59 62 " country = :COUNTRY," 63 " plot = :PLOT," 60 64 " publisher = :PUBLISHER," 61 65 " favorite = :FAVORITE," 66 " screenshot = :SCREENSHOT," 62 67 " fanart = :FANART," 63 68 " boxart = :BOXART " 64 69 "WHERE gametype = :GAMETYPE AND " … … 67 72 query.bindValue(":GENRE", Genre()); 68 73 query.bindValue(":YEAR", Year()); 69 74 query.bindValue(":COUNTRY", Country()); 75 query.bindValue(":PLOT", Plot()); 70 76 query.bindValue(":PUBLISHER", Publisher()); 71 77 query.bindValue(":FAVORITE", Favorite()); 78 query.bindValue(":SCREENSHOT", Screenshot()); 72 79 query.bindValue(":FANART", Fanart()); 73 80 query.bindValue(":BOXART", Boxart()); 74 81 query.bindValue(":GAMETYPE", GameType()); … … 155 162 favorite = data.toInt(); 156 163 else if (field == "rompath") 157 164 rompath = data; 165 else if (field == "screenshot") 166 screenshot = data; 158 167 else if (field == "fanart") 159 168 fanart = data; 160 169 else if (field == "boxart") 161 170 boxart = data; 162 171 else if (field == "country") 163 172 country = data; 173 else if (field == "plot") 174 plot = data; 164 175 else if (field == "publisher") 165 176 publisher = data; 166 177 else if (field == "crc_value") … … 225 236 } 226 237 227 238 QString thequery = "SELECT system,gamename,genre,year,romname,favorite," 228 "rompath,country,crc_value,diskcount,gametype,publisher," 229 "version,fanart,boxart FROM gamemetadata WHERE gamename = :GAMENAME " 239 "rompath,country,crc_value,diskcount,gametype,plot,publisher," 240 "version,screenshot,fanart,boxart FROM gamemetadata " 241 "WHERE gamename = :GAMENAME " 230 242 + systemtype + " ORDER BY diskcount DESC"; 231 243 232 244 query.prepare(thequery); … … 247 259 setCRC_VALUE(query.value(8).toString()); 248 260 setDiskCount(query.value(9).toInt()); 249 261 setGameType(query.value(10).toString()); 250 setPublisher(query.value(11).toString()); 251 setVersion(query.value(12).toString()); 252 setFanart(query.value(13).toString()); 253 setBoxart(query.value(14).toString()); 262 setPlot(query.value(11).toString()); 263 setPublisher(query.value(12).toString()); 264 setVersion(query.value(13).toString()); 265 setScreenshot(query.value(14).toString()); 266 setFanart(query.value(15).toString()); 267 setBoxart(query.value(16).toString()); 254 268 } 255 269 256 270 query.prepare("SELECT screenshots FROM gameplayers " -
mythgame/mythgame/gamehandler.h
67 67 void GetMetadata(GameHandler *handler, QString rom, 68 68 QString* Genre, QString* Year, QString* Country, 69 69 QString* CRC32, QString* GameName, 70 QString* P ublisher, QString* Version,70 QString* Plot, QString* Publisher, QString* Version, 71 71 QString* Fanart, QString* Boxart); 72 72 73 73 void promptForRemoval(QString filename, QString RomPath ); -
mythgame/mythgame/gameui.h
59 59 MythUIText *m_gameSystem; 60 60 MythUIText *m_gameYear; 61 61 MythUIText *m_gameGenre; 62 MythUIText *m_gamePlot; 62 63 MythUIText *m_gameFavourite; 63 64 MythUIImage *m_gameImage; 64 65 MythUIImage *m_fanartImage; -
mythgame/mythgame/rominfo.h
12 12 QString lgenre = "", QString lyear = "", bool lfavorite = FALSE, 13 13 QString lrompath = "", QString lcountry ="", QString lcrc_value = "", 14 14 int ldiskcount = 0, QString lgametype = "", int lromcount = 0, 15 QString lallsystems = "", QString lpublisher = "", QString lversion = "", 16 QString lfanart = "", QString lboxart = "") 15 QString lallsystems = "", QString lplot = "", QString lpublisher = "", 16 QString lversion = "", QString lscreenshot = "", QString lfanart = "", 17 QString lboxart = "") 17 18 { 18 19 romname = lromname; 19 20 system = lsystem; … … 22 23 year = lyear; 23 24 favorite = lfavorite; 24 25 rompath = lrompath; 26 screenshot = lscreenshot; 25 27 fanart = lfanart; 26 28 boxart = lboxart; 27 29 country = lcountry; … … 30 32 gametype = lgametype; 31 33 romcount = lromcount; 32 34 allsystems = lallsystems; 35 plot = lplot; 33 36 publisher = lpublisher; 34 37 version = lversion; 35 38 } … … 44 47 year = lhs.year; 45 48 favorite = lhs.favorite; 46 49 rompath = lhs.rompath; 50 screenshot = lhs.screenshot; 47 51 fanart = lhs.fanart; 48 52 boxart = lhs.boxart; 49 53 country = lhs.country; … … 52 56 gametype = lhs.gametype; 53 57 romcount = lhs.romcount; 54 58 allsystems = lhs.allsystems; 59 plot = lhs.plot; 55 60 publisher = lhs.publisher; 56 61 version = lhs.version; 57 62 } … … 63 68 QString Rompath() const { return rompath; } 64 69 void setRompath(const QString &lrompath) { rompath = lrompath; } 65 70 71 QString Screenshot() const { return screenshot; } 72 void setScreenshot(const QString &lscreenshot) { screenshot = lscreenshot; } 73 66 74 QString Fanart() const { return fanart; } 67 75 void setFanart(const QString &lfanart) { fanart = lfanart; } 68 76 … … 102 110 QString ImagePath() const { return imagepath; } 103 111 void setImagePath(const QString &limagepath) { imagepath = limagepath; } 104 112 113 QString Plot() const { return plot; } 114 void setPlot(const QString &lplot) { plot = lplot; } 115 105 116 QString Publisher() const { return publisher; } 106 117 void setPublisher(const QString &lpublisher) { publisher = lpublisher; } 107 118 … … 130 141 QString crc_value; 131 142 QString gametype; 132 143 QString allsystems; 144 QString plot; 133 145 QString publisher; 134 146 QString version; 135 147 int romcount; … … 137 149 QString year; 138 150 bool favorite; 139 151 QString rompath; 152 QString screenshot; 140 153 QString fanart; 141 154 QString boxart; 142 155 }; -
mythgame/mythgame/gamedetails.cpp
75 75 handleText("year", m_romInfo->Year()); 76 76 handleText("country", m_romInfo->Country()); 77 77 handleText("publisher", m_romInfo->Publisher()); 78 handleText("plot", m_romInfo->Plot()); 78 79 handleText("allsystems", m_romInfo->AllSystems()); 79 80 handleImage("fanart", m_romInfo->Fanart()); 80 81 handleImage("boxart", m_romInfo->Boxart()); 81 handleImage("gameimage", m_romInfo-> ImagePath());82 handleImage("gameimage", m_romInfo->Screenshot()); 82 83 83 84 return true; 84 85 } -
mythgame/mythgame/dbcheck.cpp
12 12 13 13 #include "gamesettings.h" 14 14 15 const QString currentDatabaseVersion = "101 5";15 const QString currentDatabaseVersion = "1016"; 16 16 17 17 static bool UpdateDBVersionNumber(const QString &newnumber) 18 18 { … … 397 397 return false; 398 398 } 399 399 400 if (dbver == "1015") 401 { 402 const QString updates[] = { 403 404 "ALTER TABLE gamemetadata ADD screenshot VARCHAR(255) NOT NULL AFTER rompath," 405 "ADD plot TEXT NOT NULL AFTER fanart;", 406 "" 407 }; 408 409 if (!performActualUpdate(updates, "1016", dbver)) 410 return false; 411 } 412 400 413 return true; 401 414 } -
mythgame/mythgame/gamedetails.h
36 36 MythUIText *m_genre; 37 37 MythUIText *m_year; 38 38 MythUIText *m_country; 39 MythUIText *m_plot; 39 40 MythUIText *m_publisher; 40 41 MythUIText *m_allSystems; 41 42 MythUIImage *m_fanartImage; -
mythgame/mythgame/gamesettings.cpp
86 86 return gc; 87 87 } 88 88 89 HostLineEdit *GetScreenshotDir() 90 { 91 HostLineEdit *gc = new HostLineEdit("mythgame.screenshotdir"); 92 gc->setLabel(QObject::tr("Directory where Game Screenshot is stored")); 93 gc->setValue(GetConfDir() + "/MythGame/Screenshots"); 94 gc->setHelpText(QObject::tr("This directory will be the default browse " 95 "location when assigning screenshots.")); 96 return gc; 97 } 98 89 99 HostLineEdit *GetFanartDir() 90 100 { 91 101 HostLineEdit *gc = new HostLineEdit("mythgame.fanartdir"); … … 116 126 general->addChild(GameRemovalPrompt()); 117 127 general->addChild(GameShowFileNames()); 118 128 general->addChild(GameTreeView()); 129 general->addChild(GetScreenshotDir()); 119 130 general->addChild(GetFanartDir()); 120 131 general->addChild(GetBoxartDir()); 121 132 addChild(general);