made enumeration match current coding style
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1180 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -36,14 +36,17 @@ class EXPORT ledCheckBox : public automatableButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum ledColors
|
||||
enum LedColors
|
||||
{
|
||||
YELLOW, GREEN, TOTAL_COLORS
|
||||
Yellow,
|
||||
Green,
|
||||
Red,
|
||||
NumColors
|
||||
} ;
|
||||
|
||||
ledCheckBox( const QString & _txt, QWidget * _parent,
|
||||
const QString & _name = QString::null,
|
||||
ledColors _color = YELLOW );
|
||||
LedColors _color = Yellow );
|
||||
virtual ~ledCheckBox();
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "gui_templates.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "main_window.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "group_box.h"
|
||||
#include "gui_templates.h"
|
||||
#include "knob.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
@@ -62,7 +62,7 @@ ladspaControlView::ladspaControlView( QWidget * _parent,
|
||||
ledCheckBox * toggle = new ledCheckBox(
|
||||
m_ctl->getPort()->name, this,
|
||||
QString::null,
|
||||
ledCheckBox::GREEN );
|
||||
ledCheckBox::Green );
|
||||
toggle->setModel( m_ctl->getToggledModel() );
|
||||
layout->addWidget( toggle );
|
||||
if( link != NULL )
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* led_checkbox.cpp - class ledCheckBox, an improved QCheckBox
|
||||
*
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -25,33 +25,31 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "led_checkbox.h"
|
||||
|
||||
#include <QtGui/QFontMetrics>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPaintEvent>
|
||||
|
||||
#include "led_checkbox.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
|
||||
|
||||
static const QString names[ledCheckBox::TOTAL_COLORS] =
|
||||
static const QString names[ledCheckBox::NumColors] =
|
||||
{
|
||||
"led_yellow", "led_green"
|
||||
"led_yellow", "led_green", "led_red"
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent,
|
||||
const QString & _name, ledColors _color ) :
|
||||
const QString & _name, LedColors _color ) :
|
||||
automatableButton( _parent, _name ),
|
||||
m_text( _text )
|
||||
{
|
||||
setCheckable( TRUE );
|
||||
|
||||
if( _color >= TOTAL_COLORS || _color < YELLOW )
|
||||
if( _color >= NumColors || _color < Yellow )
|
||||
{
|
||||
_color = YELLOW;
|
||||
_color = Yellow;
|
||||
}
|
||||
m_ledOnPixmap = new QPixmap( embed::getIconPixmap(
|
||||
names[_color].toAscii().constData() ) );
|
||||
|
||||
Reference in New Issue
Block a user