summaryrefslogtreecommitdiffstats
path: root/src/dlgprefshoutcast.cpp
diff options
context:
space:
mode:
authorRJ Ryan <rryan@mixxx.org>2013-11-08 23:26:00 -0500
committerRJ Ryan <rryan@mixxx.org>2013-11-08 23:26:00 -0500
commit9668e2ddffd8bbd7afbd02bbd2772b6b730096e5 (patch)
treecd61f320bf1fd37bf3f6964e56a5aadf8f8b5f21 /src/dlgprefshoutcast.cpp
parent5d801d76f5b1ea32415cc086f15a3c4f1cc4bbd5 (diff)
Preferences refactor. Fix tons of things that have been annoying me for years.
* Add DlgPreferencePage and make all preference dialogs inherit from it (this standardizes the slots slotUpdate, slotApply, slotShow, and slotHide). * Get rid of all controller-related code in DlgPreferences. * Get rid of code duplication / inconsistency in setting up preference pages in DlgPreferences. * Minor style fascism.
Diffstat (limited to 'src/dlgprefshoutcast.cpp')
-rw-r--r--src/dlgprefshoutcast.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/dlgprefshoutcast.cpp b/src/dlgprefshoutcast.cpp
index 7e54ae96e5..5ac7c44427 100644
--- a/src/dlgprefshoutcast.cpp
+++ b/src/dlgprefshoutcast.cpp
@@ -26,10 +26,8 @@
#include "shoutcast/defs_shoutcast.h"
DlgPrefShoutcast::DlgPrefShoutcast(QWidget *parent, ConfigObject<ConfigValue> *_config)
- : QWidget(parent),
+ : DlgPreferencePage(parent),
m_pConfig(_config) {
- int tmp_index = 0; //Used for finding the index of an element by name in a combobox.
- QString tmp_string;
setupUi(this);
m_pUpdateShoutcastFromPrefs = new ControlObjectThread(
@@ -44,7 +42,7 @@ DlgPrefShoutcast::DlgPrefShoutcast(QWidget *parent, ConfigObject<ConfigValue> *_
comboBoxServerType->addItem(tr("Shoutcast"), SHOUTCAST_SERVER_SHOUTCAST);
comboBoxServerType->addItem(tr("Icecast 1"), SHOUTCAST_SERVER_ICECAST1);
- tmp_index = comboBoxServerType->findData(m_pConfig->getValueString(
+ int tmp_index = comboBoxServerType->findData(m_pConfig->getValueString(
ConfigKey(SHOUTCAST_PREF_KEY,"servertype")));
if (tmp_index < 0) //Set default if invalid.
tmp_index = 0;
@@ -59,7 +57,7 @@ DlgPrefShoutcast::DlgPrefShoutcast(QWidget *parent, ConfigObject<ConfigValue> *_
ConfigKey(SHOUTCAST_PREF_KEY,"host")));
// Port
- tmp_string = m_pConfig->getValueString(
+ QString tmp_string = m_pConfig->getValueString(
ConfigKey(SHOUTCAST_PREF_KEY,"port"));
if (tmp_string.isEmpty())
tmp_string = QString(SHOUTCAST_DEFAULT_PORT);
@@ -177,7 +175,8 @@ DlgPrefShoutcast::~DlgPrefShoutcast()
void DlgPrefShoutcast::slotUpdate()
{
- enableLiveBroadcasting->setChecked((bool)m_pConfig->getValueString(ConfigKey(SHOUTCAST_PREF_KEY,"enabled")).toInt());
+ enableLiveBroadcasting->setChecked((bool)m_pConfig->getValueString(
+ ConfigKey(SHOUTCAST_PREF_KEY,"enabled")).toInt());
}
void DlgPrefShoutcast::slotApply()