33 |
|
|
34 |
#include <QStyleFactory> |
#include <QStyleFactory> |
35 |
|
|
36 |
namespace QSampler { |
|
37 |
|
// Translatable macro contextualizer. |
38 |
|
#undef _TR |
39 |
|
#define _TR(x) QT_TR_NOOP(x) |
40 |
|
|
41 |
|
|
42 |
// Default (empty/blank) name. |
// Default (empty/blank) name. |
43 |
static const char *g_pszDefName = QT_TR_NOOP("(default)"); |
static const char *g_pszDefName = _TR("(default)"); |
44 |
|
|
45 |
|
|
46 |
|
namespace QSampler { |
47 |
|
|
48 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
49 |
// QSampler::OptionsForm -- Options form implementation. |
// QSampler::OptionsForm -- Options form implementation. |
598 |
PaletteForm::namedPaletteList(&m_pOptions->settings())); |
PaletteForm::namedPaletteList(&m_pOptions->settings())); |
599 |
|
|
600 |
int iCustomColorTheme = 0; |
int iCustomColorTheme = 0; |
601 |
if (!sCustomColorTheme.isEmpty()) |
if (!sCustomColorTheme.isEmpty()) { |
602 |
iCustomColorTheme = m_ui.CustomColorThemeComboBox->findText( |
iCustomColorTheme = m_ui.CustomColorThemeComboBox->findText( |
603 |
sCustomColorTheme); |
sCustomColorTheme); |
604 |
|
if (iCustomColorTheme < 0) |
605 |
|
iCustomColorTheme = 0; |
606 |
|
} |
607 |
m_ui.CustomColorThemeComboBox->setCurrentIndex(iCustomColorTheme); |
m_ui.CustomColorThemeComboBox->setCurrentIndex(iCustomColorTheme); |
608 |
} |
} |
609 |
|
|
618 |
m_ui.CustomStyleThemeComboBox->addItems(QStyleFactory::keys()); |
m_ui.CustomStyleThemeComboBox->addItems(QStyleFactory::keys()); |
619 |
|
|
620 |
int iCustomStyleTheme = 0; |
int iCustomStyleTheme = 0; |
621 |
if (!sCustomStyleTheme.isEmpty()) |
if (!sCustomStyleTheme.isEmpty()) { |
622 |
iCustomStyleTheme = m_ui.CustomStyleThemeComboBox->findText( |
iCustomStyleTheme = m_ui.CustomStyleThemeComboBox->findText( |
623 |
sCustomStyleTheme); |
sCustomStyleTheme); |
624 |
|
if (iCustomStyleTheme < 0) |
625 |
|
iCustomStyleTheme = 0; |
626 |
|
} |
627 |
m_ui.CustomStyleThemeComboBox->setCurrentIndex(iCustomStyleTheme); |
m_ui.CustomStyleThemeComboBox->setCurrentIndex(iCustomStyleTheme); |
628 |
} |
} |
629 |
|
|