diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2017-09-13 21:57:53 +0200 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2017-09-13 22:05:45 +0200 |
| commit | e7318fda34c438529ecee7dc122187dbddb80b58 (patch) | |
| tree | 669d9dc2f4833bd3c335555df5c62355d66b2f39 /Source/Core | |
| parent | b0f93f2acc08236b6d5972bfa7779d380601f0a9 (diff) | |
Qt: Bring column selection up to par with Wx
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt2/GameList/GameList.cpp | 1 | ||||
| -rw-r--r-- | Source/Core/DolphinQt2/GameList/GameListModel.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/DolphinQt2/GameList/GameListModel.h | 1 | ||||
| -rw-r--r-- | Source/Core/DolphinQt2/MenuBar.cpp | 7 |
4 files changed, 11 insertions, 3 deletions
diff --git a/Source/Core/DolphinQt2/GameList/GameList.cpp b/Source/Core/DolphinQt2/GameList/GameList.cpp index 3ab2b71e7e..4f1d4fdb94 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.cpp +++ b/Source/Core/DolphinQt2/GameList/GameList.cpp @@ -108,6 +108,7 @@ void GameList::MakeListView() hor_header->setSectionResizeMode(GameListModel::COL_BANNER, QHeaderView::ResizeToContents); hor_header->setSectionResizeMode(GameListModel::COL_TITLE, QHeaderView::Stretch); hor_header->setSectionResizeMode(GameListModel::COL_MAKER, QHeaderView::Stretch); + hor_header->setSectionResizeMode(GameListModel::COL_FILE_NAME, QHeaderView::ResizeToContents); hor_header->setSectionResizeMode(GameListModel::COL_SIZE, QHeaderView::ResizeToContents); hor_header->setSectionResizeMode(GameListModel::COL_DESCRIPTION, QHeaderView::Stretch); hor_header->setSectionResizeMode(GameListModel::COL_RATING, QHeaderView::ResizeToContents); diff --git a/Source/Core/DolphinQt2/GameList/GameListModel.cpp b/Source/Core/DolphinQt2/GameList/GameListModel.cpp index f7381253a7..f6060c1deb 100644 --- a/Source/Core/DolphinQt2/GameList/GameListModel.cpp +++ b/Source/Core/DolphinQt2/GameList/GameListModel.cpp @@ -98,6 +98,9 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole) return game->GetMaker(); break; + case COL_FILE_NAME: + if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole) + return game->GetFileName(); case COL_SIZE: if (role == Qt::DisplayRole) return FormatSize(game->GetFileSize()); @@ -126,6 +129,8 @@ QVariant GameListModel::headerData(int section, Qt::Orientation orientation, int return tr("Description"); case COL_MAKER: return tr("Maker"); + case COL_FILE_NAME: + return tr("File Name"); case COL_SIZE: return tr("Size"); case COL_RATING: diff --git a/Source/Core/DolphinQt2/GameList/GameListModel.h b/Source/Core/DolphinQt2/GameList/GameListModel.h index 02e9ee2842..5781add1c7 100644 --- a/Source/Core/DolphinQt2/GameList/GameListModel.h +++ b/Source/Core/DolphinQt2/GameList/GameListModel.h @@ -42,6 +42,7 @@ public: COL_COUNTRY, COL_SIZE, COL_RATING, + COL_FILE_NAME, NUM_COLS }; diff --git a/Source/Core/DolphinQt2/MenuBar.cpp b/Source/Core/DolphinQt2/MenuBar.cpp index 079dc6b71c..8e8d45e182 100644 --- a/Source/Core/DolphinQt2/MenuBar.cpp +++ b/Source/Core/DolphinQt2/MenuBar.cpp @@ -328,13 +328,14 @@ void MenuBar::AddListColumnsMenu(QMenu* view_menu) { static const QMap<QString, bool*> columns{ {tr("Platform"), &SConfig::GetInstance().m_showSystemColumn}, - {tr("ID"), &SConfig::GetInstance().m_showIDColumn}, {tr("Banner"), &SConfig::GetInstance().m_showBannerColumn}, {tr("Title"), &SConfig::GetInstance().m_showTitleColumn}, {tr("Description"), &SConfig::GetInstance().m_showDescriptionColumn}, {tr("Maker"), &SConfig::GetInstance().m_showMakerColumn}, - {tr("Size"), &SConfig::GetInstance().m_showSizeColumn}, - {tr("Country"), &SConfig::GetInstance().m_showRegionColumn}, + {tr("File Name"), &SConfig::GetInstance().m_showFileNameColumn}, + {tr("Game ID"), &SConfig::GetInstance().m_showIDColumn}, + {tr("Region"), &SConfig::GetInstance().m_showRegionColumn}, + {tr("File Size"), &SConfig::GetInstance().m_showSizeColumn}, {tr("State"), &SConfig::GetInstance().m_showStateColumn}}; QActionGroup* column_group = new QActionGroup(this); |
