Initial implementation of LmmsPalette (doesn't work yet)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* interface
|
||||
*
|
||||
* Copyright (c) 2007-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -24,11 +24,58 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LMMS_STYLE_H
|
||||
#define _LMMS_STYLE_H
|
||||
#ifndef LMMS_STYLE_H
|
||||
#define LMMS_STYLE_H
|
||||
|
||||
#include <QtGui/QPlastiqueStyle>
|
||||
|
||||
#define ACCESSMET( read, write ) \
|
||||
QColor read () \
|
||||
{ return m_##read ; } \
|
||||
void write ( const QColor & _c ) \
|
||||
{ m_##read = QColor( _c ); }
|
||||
|
||||
class LmmsPalette: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY( QColor background READ background WRITE setBackground )
|
||||
Q_PROPERTY( QColor windowText READ windowText WRITE setWindowText )
|
||||
Q_PROPERTY( QColor base READ base WRITE setBase )
|
||||
Q_PROPERTY( QColor text READ text WRITE setText )
|
||||
Q_PROPERTY( QColor button READ button WRITE setButton )
|
||||
Q_PROPERTY( QColor shadow READ shadow WRITE setShadow )
|
||||
Q_PROPERTY( QColor buttonText READ buttonText WRITE setButtonText )
|
||||
Q_PROPERTY( QColor brightText READ brightText WRITE setBrightText )
|
||||
Q_PROPERTY( QColor highlight READ highlight WRITE setHighlight )
|
||||
Q_PROPERTY( QColor highlightedText READ highlightedText WRITE setHighlightedText )
|
||||
|
||||
public:
|
||||
LmmsPalette( QWidget * _parent );
|
||||
virtual ~LmmsPalette() {};
|
||||
|
||||
ACCESSMET( background, setBackground )
|
||||
ACCESSMET( windowText, setWindowText )
|
||||
ACCESSMET( base, setBase )
|
||||
ACCESSMET( text, setText )
|
||||
ACCESSMET( button, setButton )
|
||||
ACCESSMET( shadow, setShadow )
|
||||
ACCESSMET( buttonText, setButtonText )
|
||||
ACCESSMET( brightText, setBrightText )
|
||||
ACCESSMET( highlight, setHighlight )
|
||||
ACCESSMET( highlightedText, setHighlightedText )
|
||||
|
||||
private:
|
||||
QColor m_background;
|
||||
QColor m_windowText;
|
||||
QColor m_base;
|
||||
QColor m_text;
|
||||
QColor m_button;
|
||||
QColor m_shadow;
|
||||
QColor m_buttonText;
|
||||
QColor m_brightText;
|
||||
QColor m_highlight;
|
||||
QColor m_highlightedText;
|
||||
};
|
||||
|
||||
class LmmsStyle : public QPlastiqueStyle
|
||||
{
|
||||
@@ -81,7 +128,7 @@ public:
|
||||
const QWidget *widget = 0 ) const;
|
||||
|
||||
virtual int pixelMetric( PixelMetric metric,
|
||||
const QStyleOption * option = 0,
|
||||
const QStyleOption * option = 0,
|
||||
const QWidget * widget = 0 ) const;
|
||||
|
||||
// QSize sizeFromContents( ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget ) const;
|
||||
|
||||
Reference in New Issue
Block a user