mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 18:28:35 +12:00
Qt: format category maps. they were ugly af
This commit is contained in:
parent
50dd704f2b
commit
3ed98be6cd
4 changed files with 42 additions and 42 deletions
|
@ -777,7 +777,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
||||||
//Disable options depending on software category
|
//Disable options depending on software category
|
||||||
QString category = qstr(currGame.category);
|
QString category = qstr(currGame.category);
|
||||||
|
|
||||||
if (category == category::disc_Game)
|
if (category == category::disc_game)
|
||||||
{
|
{
|
||||||
removeGame->setEnabled(false);
|
removeGame->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
@ -789,7 +789,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
||||||
openConfig->setEnabled(false);
|
openConfig->setEnabled(false);
|
||||||
checkCompat->setEnabled(false);
|
checkCompat->setEnabled(false);
|
||||||
}
|
}
|
||||||
else if (category != category::hdd_Game)
|
else if (category != category::hdd_game)
|
||||||
{
|
{
|
||||||
checkCompat->setEnabled(false);
|
checkCompat->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,17 +31,17 @@ enum Category
|
||||||
namespace category // (see PARAM.SFO in psdevwiki.com) TODO: Disc Categories
|
namespace category // (see PARAM.SFO in psdevwiki.com) TODO: Disc Categories
|
||||||
{
|
{
|
||||||
// PS3 bootable
|
// PS3 bootable
|
||||||
const QString app_Music = QObject::tr("App Music");
|
const QString app_music = QObject::tr("App Music");
|
||||||
const QString app_Photo = QObject::tr("App Photo");
|
const QString app_photo = QObject::tr("App Photo");
|
||||||
const QString app_TV = QObject::tr("App TV");
|
const QString app_tv = QObject::tr("App TV");
|
||||||
const QString app_Video = QObject::tr("App Video");
|
const QString app_video = QObject::tr("App Video");
|
||||||
const QString bc_Video = QObject::tr("Broadcast Video");
|
const QString bc_video = QObject::tr("Broadcast Video");
|
||||||
const QString disc_Game = QObject::tr("Disc Game");
|
const QString disc_game = QObject::tr("Disc Game");
|
||||||
const QString hdd_Game = QObject::tr("HDD Game");
|
const QString hdd_game = QObject::tr("HDD Game");
|
||||||
const QString home = QObject::tr("Home");
|
const QString home = QObject::tr("Home");
|
||||||
const QString network = QObject::tr("Network");
|
const QString network = QObject::tr("Network");
|
||||||
const QString store_FE = QObject::tr("Store");
|
const QString store_fe = QObject::tr("Store");
|
||||||
const QString web_TV = QObject::tr("Web TV");
|
const QString web_tv = QObject::tr("Web TV");
|
||||||
|
|
||||||
// PS2 bootable
|
// PS2 bootable
|
||||||
const QString ps2_game = QObject::tr("PS2 Classics");
|
const QString ps2_game = QObject::tr("PS2 Classics");
|
||||||
|
@ -56,12 +56,12 @@ namespace category // (see PARAM.SFO in psdevwiki.com) TODO: Disc Categories
|
||||||
const QString psp_rema = QObject::tr("PSP Remasters");
|
const QString psp_rema = QObject::tr("PSP Remasters");
|
||||||
|
|
||||||
// Data
|
// Data
|
||||||
const QString ps3_Data = QObject::tr("PS3 Game Data");
|
const QString ps3_data = QObject::tr("PS3 Game Data");
|
||||||
const QString ps2_Data = QObject::tr("PS2 Emulator Data");
|
const QString ps2_data = QObject::tr("PS2 Emulator Data");
|
||||||
|
|
||||||
// Save
|
// Save
|
||||||
const QString ps3_Save = QObject::tr("PS3 Save Data");
|
const QString ps3_save = QObject::tr("PS3 Save Data");
|
||||||
const QString psp_Save = QObject::tr("PSP Minis Save Data");
|
const QString psp_save = QObject::tr("PSP Minis Save Data");
|
||||||
|
|
||||||
// others
|
// others
|
||||||
const QString trophy = QObject::tr("Trophy");
|
const QString trophy = QObject::tr("Trophy");
|
||||||
|
@ -70,36 +70,36 @@ namespace category // (see PARAM.SFO in psdevwiki.com) TODO: Disc Categories
|
||||||
|
|
||||||
const q_from_char cat_boot =
|
const q_from_char cat_boot =
|
||||||
{
|
{
|
||||||
{ "AM",app_Music }, // media
|
{ "AM", app_music }, // media
|
||||||
{ "AP",app_Photo }, // media
|
{ "AP", app_photo }, // media
|
||||||
{ "AT",app_TV }, // media
|
{ "AT", app_tv }, // media
|
||||||
{ "AV",app_Video }, // media
|
{ "AV", app_video }, // media
|
||||||
{ "BV",bc_Video }, // media
|
{ "BV", bc_video }, // media
|
||||||
{ "DG",disc_Game }, // disc_Game
|
{ "WT", web_tv }, // media
|
||||||
{ "HG",hdd_Game }, // non_disc_games
|
|
||||||
{ "HM", home }, // home
|
{ "HM", home }, // home
|
||||||
{ "CB", network }, // other
|
{ "CB", network }, // other
|
||||||
{ "SF",store_FE }, // other
|
{ "SF", store_fe }, // other
|
||||||
{ "WT",web_TV }, // media
|
{ "DG", disc_game }, // disc_Game
|
||||||
|
{ "HG", hdd_game }, // non_disc_games
|
||||||
{ "2P", ps2_game }, // non_disc_games
|
{ "2P", ps2_game }, // non_disc_games
|
||||||
{ "2G", ps2_inst }, // non_disc_games
|
{ "2G", ps2_inst }, // non_disc_games
|
||||||
{ "1P", ps1_game }, // non_disc_games
|
{ "1P", ps1_game }, // non_disc_games
|
||||||
{ "PP", psp_game }, // non_disc_games
|
{ "PP", psp_game }, // non_disc_games
|
||||||
{ "MN", psp_mini }, // non_disc_games
|
{ "MN", psp_mini }, // non_disc_games
|
||||||
{ "PE",psp_rema } // non_disc_games
|
{ "PE", psp_rema }, // non_disc_games
|
||||||
};
|
};
|
||||||
const q_from_char cat_data =
|
const q_from_char cat_data =
|
||||||
{
|
{
|
||||||
{ "GD",ps3_Data }, // data
|
{ "GD", ps3_data }, // data
|
||||||
{ "2D",ps2_Data }, // data
|
{ "2D", ps2_data }, // data
|
||||||
{ "SD",ps3_Save }, // data
|
{ "SD", ps3_save }, // data
|
||||||
{ "MS",psp_Save } // data
|
{ "MS", psp_save } // data
|
||||||
};
|
};
|
||||||
|
|
||||||
const QStringList non_disc_games = { hdd_Game, ps2_game, ps2_inst, ps1_game, psp_game, psp_mini, psp_rema };
|
const QStringList non_disc_games = { hdd_game, ps2_game, ps2_inst, ps1_game, psp_game, psp_mini, psp_rema };
|
||||||
const QStringList media = { app_Photo, app_Video, bc_Video, app_Music, app_TV, web_TV };
|
const QStringList media = { app_photo, app_video, bc_video, app_music, app_tv, web_tv };
|
||||||
const QStringList data = { ps3_Data, ps2_Data, ps3_Save, psp_Save };
|
const QStringList data = { ps3_data, ps2_data, ps3_save, psp_save };
|
||||||
const QStringList others = { network, store_FE, trophy, other };
|
const QStringList others = { network, store_fe, trophy, other };
|
||||||
|
|
||||||
inline bool CategoryInMap(const std::string& cat, const q_from_char& map)
|
inline bool CategoryInMap(const std::string& cat, const q_from_char& map)
|
||||||
{
|
{
|
||||||
|
|
|
@ -119,7 +119,7 @@ QStringList gui_settings::GetGameListCategoryFilters()
|
||||||
{
|
{
|
||||||
QStringList filterList;
|
QStringList filterList;
|
||||||
if (GetCategoryVisibility(Category::Non_Disc_Game)) filterList.append(category::non_disc_games);
|
if (GetCategoryVisibility(Category::Non_Disc_Game)) filterList.append(category::non_disc_games);
|
||||||
if (GetCategoryVisibility(Category::Disc_Game)) filterList.append(category::disc_Game);
|
if (GetCategoryVisibility(Category::Disc_Game)) filterList.append(category::disc_game);
|
||||||
if (GetCategoryVisibility(Category::Home)) filterList.append(category::home);
|
if (GetCategoryVisibility(Category::Home)) filterList.append(category::home);
|
||||||
if (GetCategoryVisibility(Category::Media)) filterList.append(category::media);
|
if (GetCategoryVisibility(Category::Media)) filterList.append(category::media);
|
||||||
if (GetCategoryVisibility(Category::Data)) filterList.append(category::data);
|
if (GetCategoryVisibility(Category::Data)) filterList.append(category::data);
|
||||||
|
|
|
@ -1348,7 +1348,7 @@ void main_window::CreateConnects()
|
||||||
const bool& checked = act->isChecked();
|
const bool& checked = act->isChecked();
|
||||||
|
|
||||||
if (act == ui->showCatHDDGameAct) categories += category::non_disc_games, id = Category::Non_Disc_Game;
|
if (act == ui->showCatHDDGameAct) categories += category::non_disc_games, id = Category::Non_Disc_Game;
|
||||||
else if (act == ui->showCatDiscGameAct) categories += category::disc_Game, id = Category::Disc_Game;
|
else if (act == ui->showCatDiscGameAct) categories += category::disc_game, id = Category::Disc_Game;
|
||||||
else if (act == ui->showCatHomeAct) categories += category::home, id = Category::Home;
|
else if (act == ui->showCatHomeAct) categories += category::home, id = Category::Home;
|
||||||
else if (act == ui->showCatAudioVideoAct) categories += category::media, id = Category::Media;
|
else if (act == ui->showCatAudioVideoAct) categories += category::media, id = Category::Media;
|
||||||
else if (act == ui->showCatGameDataAct) categories += category::data, id = Category::Data;
|
else if (act == ui->showCatGameDataAct) categories += category::data, id = Category::Data;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue