[mythtv] Re: compiling mythtv frontend for cygwin
Mario L
superm1 at gmail.com
Thu Oct 14 20:43:17 UTC 2004
Well but that theory seems to be broken because the same thing happens
in globalsettings.cpp, unless that is one problem and this is another
completely unrelated problem:
class StyleSetting: public ComboBoxSetting, public GlobalSetting {
public:
StyleSetting():
GlobalSetting("Style") {
setLabel(QObject::tr("Qt Style"));
fillSelections();
setHelpText(QObject::tr("At startup, MythTV will change the Qt "
"widget style to this setting. If \"Desktop Style\" "
"is selected, MythTV will use the existing desktop "
"setting."));
};
void fillSelections(void) {
clearSelections();
addSelection(QObject::tr("Desktop Style"), "");
QStyleFactory factory;
QStringList list = factory.keys();
QStringList::iterator iter = list.begin();
VERBOSE(VB_ALL,"iteration started");
for (; iter != list.end(); iter++ )
addSelection(*iter);
};
void load(QSqlDatabase *db) {
fillSelections();
GlobalSetting::load(db);
};
};
If you look further into that keys function, it must yield something
out, each of the entries are manually added in:
QStringList QStyleFactory::keys()
{
QStringList list;
#ifndef QT_NO_COMPONENT
if ( !instance )
instance = new QStyleFactoryPrivate;
list = QStyleFactoryPrivate::manager->featureList();
#endif //QT_NO_COMPONENT
#ifndef QT_NO_STYLE_WINDOWS
if ( !list.contains( "Windows" ) )
list << "Windows";
#endif
#ifndef QT_NO_STYLE_WINDOWSXP
if ( !list.contains( "WindowsXP" ) && QWindowsXPStyle::resolveSymbols() )
list << "WindowsXP";
#endif
#ifndef QT_NO_STYLE_MOTIF
if ( !list.contains( "Motif" ) )
list << "Motif";
#endif
#ifndef QT_NO_STYLE_CDE
if ( !list.contains( "CDE" ) )
list << "CDE";
#endif
#ifndef QT_NO_STYLE_MOTIFPLUS
if ( !list.contains( "MotifPlus" ) )
list << "MotifPlus";
#endif
#ifndef QT_NO_STYLE_PLATINUM
if ( !list.contains( "Platinum" ) )
list << "Platinum";
#endif
#ifndef QT_NO_STYLE_SGI
if ( !list.contains( "SGI" ) )
list << "SGI";
#endif
#ifndef QT_NO_STYLE_COMPACT
if ( !list.contains( "Compact" ) )
list << "Compact";
#endif
#ifndef QT_NO_STYLE_AQUA
if ( !list.contains( "Aqua" ) )
list << "Aqua";
#endif
#if !defined( QT_NO_STYLE_MAC ) && defined( Q_WS_MAC )
QString mstyle = "Macintosh";
Collection c = NewCollection();
if (c) {
GetTheme(c);
Str255 str;
long int s = 256;
if(!GetCollectionItem(c, kThemeNameTag, 0, &s, &str))
mstyle += " (" + p2qstring(str) + ")";
}
if (!list.contains(mstyle))
list << mstyle;
DisposeCollection(c);
#endif
return list;
}
More information about the mythtv-dev
mailing list