mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 10:21:21 +00:00
Qt: Add Operating system category
This commit is contained in:
parent
7a4e88c146
commit
1d23be8429
@ -13,6 +13,7 @@ enum Category
|
||||
Home,
|
||||
Media,
|
||||
Data,
|
||||
OS,
|
||||
Unknown_Cat,
|
||||
Others,
|
||||
};
|
||||
@ -50,5 +51,6 @@ namespace cat
|
||||
const QStringList psp_games = { cat_psp_game, cat_psp_mini, cat_psp_rema };
|
||||
const QStringList media = { cat_app_photo, cat_app_video, cat_bc_video, cat_app_music, cat_app_store, cat_app_tv, cat_web_tv };
|
||||
const QStringList data = { cat_ps3_data, cat_ps2_data, cat_ps3_save, cat_psp_save };
|
||||
const QStringList others = { cat_network, cat_store_fe, cat_ps3_os };
|
||||
const QStringList os = { cat_ps3_os };
|
||||
const QStringList others = { cat_network, cat_store_fe };
|
||||
}
|
||||
|
@ -125,6 +125,7 @@ QStringList gui_settings::GetGameListCategoryFilters(bool is_list_mode) const
|
||||
if (GetCategoryVisibility(Category::Home, is_list_mode)) filterList.append(cat::cat_home);
|
||||
if (GetCategoryVisibility(Category::Media, is_list_mode)) filterList.append(cat::media);
|
||||
if (GetCategoryVisibility(Category::Data, is_list_mode)) filterList.append(cat::data);
|
||||
if (GetCategoryVisibility(Category::OS, is_list_mode)) filterList.append(cat::os);
|
||||
if (GetCategoryVisibility(Category::Unknown_Cat, is_list_mode)) filterList.append(cat::cat_unknown);
|
||||
if (GetCategoryVisibility(Category::Others, is_list_mode)) filterList.append(cat::others);
|
||||
|
||||
@ -344,6 +345,7 @@ gui_save gui_settings::GetGuiSaveForCategory(int cat, bool is_list_mode)
|
||||
case Category::PSP_Game: return is_list_mode ? gui::cat_psp_game : gui::grid_cat_psp_game;
|
||||
case Category::Media: return is_list_mode ? gui::cat_audio_video : gui::grid_cat_audio_video;
|
||||
case Category::Data: return is_list_mode ? gui::cat_game_data : gui::grid_cat_game_data;
|
||||
case Category::OS: return is_list_mode ? gui::cat_os : gui::grid_cat_os;
|
||||
case Category::Unknown_Cat: return is_list_mode ? gui::cat_unknown : gui::grid_cat_unknown;
|
||||
case Category::Others: return is_list_mode ? gui::cat_other : gui::grid_cat_other;
|
||||
default:
|
||||
|
@ -161,6 +161,7 @@ namespace gui
|
||||
const gui_save cat_home = gui_save(game_list, "categoryVisibleHome", true);
|
||||
const gui_save cat_audio_video = gui_save(game_list, "categoryVisibleAudioVideo", true);
|
||||
const gui_save cat_game_data = gui_save(game_list, "categoryVisibleGameData", false);
|
||||
const gui_save cat_os = gui_save(game_list, "categoryVisibleOS", false);
|
||||
const gui_save cat_unknown = gui_save(game_list, "categoryVisibleUnknown", true);
|
||||
const gui_save cat_other = gui_save(game_list, "categoryVisibleOther", true);
|
||||
|
||||
@ -172,6 +173,7 @@ namespace gui
|
||||
const gui_save grid_cat_home = gui_save(game_list, "gridCategoryVisibleHome", true);
|
||||
const gui_save grid_cat_audio_video = gui_save(game_list, "gridCategoryVisibleAudioVideo", true);
|
||||
const gui_save grid_cat_game_data = gui_save(game_list, "gridCategoryVisibleGameData", false);
|
||||
const gui_save grid_cat_os = gui_save(game_list, "gridCategoryVisibleOS", false);
|
||||
const gui_save grid_cat_unknown = gui_save(game_list, "gridCategoryVisibleUnknown", true);
|
||||
const gui_save grid_cat_other = gui_save(game_list, "gridCategoryVisibleOther", true);
|
||||
|
||||
|
@ -2391,6 +2391,7 @@ void main_window::UpdateFilterActions()
|
||||
ui->showCatHomeAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Home, m_is_list_mode));
|
||||
ui->showCatAudioVideoAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Media, m_is_list_mode));
|
||||
ui->showCatGameDataAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Data, m_is_list_mode));
|
||||
ui->showCatOSAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::OS, m_is_list_mode));
|
||||
ui->showCatUnknownAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Unknown_Cat, m_is_list_mode));
|
||||
ui->showCatOtherAct->setChecked(m_gui_settings->GetCategoryVisibility(Category::Others, m_is_list_mode));
|
||||
}
|
||||
@ -2551,6 +2552,7 @@ void main_window::CreateActions()
|
||||
m_category_visible_act_group->addAction(ui->showCatHomeAct);
|
||||
m_category_visible_act_group->addAction(ui->showCatAudioVideoAct);
|
||||
m_category_visible_act_group->addAction(ui->showCatGameDataAct);
|
||||
m_category_visible_act_group->addAction(ui->showCatOSAct);
|
||||
m_category_visible_act_group->addAction(ui->showCatUnknownAct);
|
||||
m_category_visible_act_group->addAction(ui->showCatOtherAct);
|
||||
m_category_visible_act_group->setExclusive(false);
|
||||
@ -3227,16 +3229,17 @@ void main_window::CreateConnects()
|
||||
const auto get_cats = [this](QAction* act, int& id) -> QStringList
|
||||
{
|
||||
QStringList categories;
|
||||
if (act == ui->showCatHDDGameAct) { categories += cat::cat_hdd_game; id = Category::HDD_Game; }
|
||||
else if (act == ui->showCatDiscGameAct) { categories += cat::cat_disc_game; id = Category::Disc_Game; }
|
||||
else if (act == ui->showCatPS1GamesAct) { categories += cat::cat_ps1_game; id = Category::PS1_Game; }
|
||||
else if (act == ui->showCatPS2GamesAct) { categories += cat::ps2_games; id = Category::PS2_Game; }
|
||||
else if (act == ui->showCatPSPGamesAct) { categories += cat::psp_games; id = Category::PSP_Game; }
|
||||
else if (act == ui->showCatHomeAct) { categories += cat::cat_home; id = Category::Home; }
|
||||
else if (act == ui->showCatAudioVideoAct) { categories += cat::media; id = Category::Media; }
|
||||
else if (act == ui->showCatGameDataAct) { categories += cat::data; id = Category::Data; }
|
||||
else if (act == ui->showCatUnknownAct) { categories += cat::cat_unknown; id = Category::Unknown_Cat; }
|
||||
else if (act == ui->showCatOtherAct) { categories += cat::others; id = Category::Others; }
|
||||
if (act == ui->showCatHDDGameAct) { categories.append(cat::cat_hdd_game); id = Category::HDD_Game; }
|
||||
else if (act == ui->showCatDiscGameAct) { categories.append(cat::cat_disc_game); id = Category::Disc_Game; }
|
||||
else if (act == ui->showCatPS1GamesAct) { categories.append(cat::cat_ps1_game); id = Category::PS1_Game; }
|
||||
else if (act == ui->showCatPS2GamesAct) { categories.append(cat::ps2_games); id = Category::PS2_Game; }
|
||||
else if (act == ui->showCatPSPGamesAct) { categories.append(cat::psp_games); id = Category::PSP_Game; }
|
||||
else if (act == ui->showCatHomeAct) { categories.append(cat::cat_home); id = Category::Home; }
|
||||
else if (act == ui->showCatAudioVideoAct) { categories.append(cat::media); id = Category::Media; }
|
||||
else if (act == ui->showCatGameDataAct) { categories.append(cat::data); id = Category::Data; }
|
||||
else if (act == ui->showCatOSAct) { categories.append(cat::os); id = Category::OS; }
|
||||
else if (act == ui->showCatUnknownAct) { categories.append(cat::cat_unknown); id = Category::Unknown_Cat; }
|
||||
else if (act == ui->showCatOtherAct) { categories.append(cat::others); id = Category::Others; }
|
||||
else { gui_log.warning("categoryVisibleActGroup: category action not found"); }
|
||||
return categories;
|
||||
};
|
||||
@ -3276,6 +3279,7 @@ void main_window::CreateConnects()
|
||||
set_cat_count(ui->showCatHomeAct, tr("Home"));
|
||||
set_cat_count(ui->showCatAudioVideoAct, tr("Audio/Video"));
|
||||
set_cat_count(ui->showCatGameDataAct, tr("Game Data"));
|
||||
set_cat_count(ui->showCatOSAct, tr("Operating System"));
|
||||
set_cat_count(ui->showCatUnknownAct, tr("Unknown"));
|
||||
set_cat_count(ui->showCatOtherAct, tr("Other"));
|
||||
});
|
||||
|
@ -355,6 +355,7 @@
|
||||
<addaction name="showCatHomeAct"/>
|
||||
<addaction name="showCatAudioVideoAct"/>
|
||||
<addaction name="showCatGameDataAct"/>
|
||||
<addaction name="showCatOSAct"/>
|
||||
<addaction name="showCatUnknownAct"/>
|
||||
<addaction name="showCatOtherAct"/>
|
||||
</widget>
|
||||
@ -883,9 +884,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>HDD Games</string>
|
||||
</property>
|
||||
@ -894,9 +892,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Disc Games</string>
|
||||
</property>
|
||||
@ -905,9 +900,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PS1 Games</string>
|
||||
</property>
|
||||
@ -916,9 +908,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PS2 Games</string>
|
||||
</property>
|
||||
@ -927,9 +916,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PSP Games</string>
|
||||
</property>
|
||||
@ -938,9 +924,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Home</string>
|
||||
</property>
|
||||
@ -949,9 +932,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Audio/Video</string>
|
||||
</property>
|
||||
@ -960,9 +940,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Game Data</string>
|
||||
</property>
|
||||
@ -971,9 +948,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unknown</string>
|
||||
</property>
|
||||
@ -1090,9 +1064,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Other</string>
|
||||
</property>
|
||||
@ -1402,6 +1373,14 @@
|
||||
<string>PS Move</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="showCatOSAct">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Operating System</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user