1
0
Fork 0

Merge pull request #4489 from FearlessTobi/port-ui-stuff

Port QT interface changes from yuzu.
This commit is contained in:
Weiyi Wang 2018-12-21 20:52:14 -05:00 committed by GitHub
commit 3ede436053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 21 additions and 21 deletions

View File

@ -16,16 +16,15 @@ class ConfigureAudio : public QWidget {
public:
explicit ConfigureAudio(QWidget* parent = nullptr);
~ConfigureAudio();
~ConfigureAudio() override;
void applyConfiguration();
void retranslateUi();
void setConfiguration();
public slots:
private:
void updateAudioDevices(int sink_index);
private:
void setOutputSinkFromSinkID();
void setAudioDeviceFromDeviceID();
void setVolumeIndicatorText(int percentage);

View File

@ -16,7 +16,7 @@ class ConfigureCamera : public QWidget {
public:
explicit ConfigureCamera(QWidget* parent = nullptr);
~ConfigureCamera();
~ConfigureCamera() override;
void applyConfiguration();
void retranslateUi();

View File

@ -16,12 +16,11 @@ class ConfigureDebug : public QWidget {
public:
explicit ConfigureDebug(QWidget* parent = nullptr);
~ConfigureDebug();
~ConfigureDebug() override;
void applyConfiguration();
void retranslateUi();
void setConfiguration();
private:
std::unique_ptr<Ui::ConfigureDebug> ui;
};

View File

@ -18,7 +18,7 @@ class ConfigureDialog : public QDialog {
public:
explicit ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry);
~ConfigureDialog();
~ConfigureDialog() override;
void applyConfiguration();
void UpdateVisibleTabs();
@ -34,6 +34,5 @@ private:
void setConfiguration();
void retranslateUi();
private:
std::unique_ptr<Ui::ConfigureDialog> ui;
};

View File

@ -18,7 +18,7 @@ class ConfigureGeneral : public QWidget {
public:
explicit ConfigureGeneral(QWidget* parent = nullptr);
~ConfigureGeneral();
~ConfigureGeneral() override;
void PopulateHotkeyList(const HotkeyRegistry& registry);
void ResetDefaults();

View File

@ -16,13 +16,12 @@ class ConfigureGraphics : public QWidget {
public:
explicit ConfigureGraphics(QWidget* parent = nullptr);
~ConfigureGraphics();
~ConfigureGraphics() override;
void applyConfiguration();
void retranslateUi();
void setConfiguration();
private:
std::unique_ptr<Ui::ConfigureGraphics> ui;
QColor bg_color;
};

View File

@ -221,6 +221,8 @@ ConfigureInput::ConfigureInput(QWidget* parent)
ui->buttonHome->setEnabled(false);
}
ConfigureInput::~ConfigureInput() = default;
void ConfigureInput::applyConfiguration() {
std::transform(buttons_param.begin(), buttons_param.end(), Settings::values.buttons.begin(),
[](const Common::ParamPackage& param) { return param.Serialize(); });

View File

@ -30,6 +30,7 @@ class ConfigureInput : public QWidget {
public:
explicit ConfigureInput(QWidget* parent = nullptr);
~ConfigureInput() override;
/// Save all button configurations to settings file
void applyConfiguration();

View File

@ -46,7 +46,7 @@ class ConfigureMotionTouch : public QDialog {
public:
explicit ConfigureMotionTouch(QWidget* parent = nullptr);
~ConfigureMotionTouch();
~ConfigureMotionTouch() override;
public slots:
void applyConfiguration();

View File

@ -16,7 +16,7 @@ class ConfigureUi : public QWidget {
public:
explicit ConfigureUi(QWidget* parent = nullptr);
~ConfigureUi();
~ConfigureUi() override;
void applyConfiguration();
void retranslateUi();

View File

@ -17,19 +17,18 @@ class ConfigureWeb : public QWidget {
public:
explicit ConfigureWeb(QWidget* parent = nullptr);
~ConfigureWeb();
~ConfigureWeb() override;
void applyConfiguration();
void retranslateUi();
void setConfiguration();
public slots:
private:
void RefreshTelemetryID();
void OnLoginChanged();
void VerifyLogin();
void OnLoginVerified();
private:
bool user_verified = true;
QFutureWatcher<bool> verify_watcher;

View File

@ -287,6 +287,7 @@ GameList::GameList(GMainWindow* parent) : QWidget{parent} {
tree_view->setEditTriggers(QHeaderView::NoEditTriggers);
tree_view->setUniformRowHeights(true);
tree_view->setContextMenuPolicy(Qt::CustomContextMenu);
tree_view->setStyleSheet("QTreeView{ border: none; }");
item_model->insertColumns(0, COLUMN_COUNT);
item_model->setHeaderData(COLUMN_NAME, Qt::Horizontal, tr("Name"));

View File

@ -37,12 +37,13 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign
const auto callback = [this, recursion, parent_dir](u64* num_entries_out,
const std::string& directory,
const std::string& virtual_name) -> bool {
std::string physical_name = directory + DIR_SEP + virtual_name;
if (stop_processing) {
// Breaks the callback loop.
return false;
}
if (stop_processing)
return false; // Breaks the callback loop.
bool is_dir = FileUtil::IsDirectory(physical_name);
const std::string physical_name = directory + DIR_SEP + virtual_name;
const bool is_dir = FileUtil::IsDirectory(physical_name);
if (!is_dir && HasSupportedFileExtension(physical_name)) {
std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(physical_name);
if (!loader)