Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/skin/legacyskinparser.h

Go to the documentation of this file.
00001 #ifndef LEGACYSKINPARSER_H
00002 #define LEGACYSKINPARSER_H
00003 
00004 #include <QObject>
00005 #include <QString>
00006 #include <QList>
00007 #include <QDomElement>
00008 #include <QMutex>
00009 
00010 #include "configobject.h"
00011 #include "skin/skinparser.h"
00012 #include "vinylcontrol/vinylcontrolmanager.h"
00013 
00014 class Library;
00015 class MixxxKeyboard;
00016 class PlayerManager;
00017 class WAbstractControl;
00018 
00019 class LegacySkinParser : public QObject, public SkinParser {
00020     Q_OBJECT
00021   public:
00022     LegacySkinParser(ConfigObject<ConfigValue>* pConfig,
00023                      MixxxKeyboard* pKeyboard, PlayerManager* pPlayerManager,
00024                      Library* pLibrary, VinylControlManager* pVCMan);
00025     virtual ~LegacySkinParser();
00026 
00027     virtual bool canParse(QString skinPath);
00028     virtual QWidget* parseSkin(QString skinPath, QWidget* pParent);
00029 
00030     // Legacy support for looking up the scheme list.
00031     static QList<QString> getSchemeList(QString qSkinPath);
00032     static void freeChannelStrings();
00033   private:
00034     static QDomElement openSkin(QString skinPath);
00035 
00036     QWidget* parseNode(QDomElement node, QWidget* pGrandparent);
00037 
00038     // Support for various legacy behavior
00039     void parseColorSchemes(QDomElement node);
00040     void setControlDefaults(QDomNode node, WAbstractControl* pControl);
00041     bool compareConfigKeys(QDomNode node, QString key);
00042 
00043     // Parsers for each node
00044     QWidget* parseWidgetGroup(QDomElement node);
00045     QWidget* parseBackground(QDomElement node, QWidget* pGrandparent);
00046     QWidget* parsePushButton(QDomElement node);
00047     QWidget* parseSliderComposed(QDomElement node);
00048     QWidget* parseVisual(QDomElement node);
00049     QWidget* parseOverview(QDomElement node);
00050     QWidget* parseText(QDomElement node);
00051     QWidget* parseTime(QDomElement node);
00052     QWidget* parseTrackProperty(QDomElement node);
00053     QWidget* parseVuMeter(QDomElement node);
00054     QWidget* parseStatusLight(QDomElement node);
00055     QWidget* parseDisplay(QDomElement node);
00056     QWidget* parseNumberRate(QDomElement node);
00057     QWidget* parseNumberPos(QDomElement node);
00058     QWidget* parseNumberBpm(QDomElement node);
00059     QWidget* parseNumber(QDomElement node);
00060     QWidget* parseLabel(QDomElement node);
00061     QWidget* parseKnob(QDomElement node);
00062     QWidget* parseTableView(QDomElement node);
00063     QWidget* parseStyle(QDomElement node);
00064     QWidget* parseSpinny(QDomElement node);
00065 
00066     void setupPosition(QDomNode node, QWidget* pWidget);
00067     void setupSize(QDomNode node, QWidget* pWidget);
00068     void setupWidget(QDomNode node, QWidget* pWidget);
00069     void setupConnections(QDomNode node, QWidget* pWidget);
00070 
00071     QString lookupNodeGroup(QDomElement node);
00072     static const char* safeChannelString(QString channelStr);
00073 
00074     ConfigObject<ConfigValue>* m_pConfig;
00075     MixxxKeyboard* m_pKeyboard;
00076     PlayerManager* m_pPlayerManager;
00077     Library* m_pLibrary;
00078     VinylControlManager* m_pVCManager;
00079     QWidget *m_pParent;
00080     static QList<const char*> s_channelStrs;
00081     static QMutex s_safeStringMutex;
00082 };
00083 
00084 
00085 #endif /* LEGACYSKINPARSER_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines