Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added hardware support zu scene editor #1194

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ui/src/consolechannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ void ConsoleChannel::setChannelStyleSheet(const QString &styleSheet)
m_styleSheet = styleSheet;
}

void ConsoleChannel::setSliderStylesheet(const QString &styleSheet)
{
m_slider->setSliderStyleSheet(styleSheet);
}

void ConsoleChannel::showResetButton(bool show)
{
if (show == true)
Expand Down
1 change: 1 addition & 0 deletions ui/src/consolechannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ private slots:
void setChannelStyleSheet(const QString& styleSheet);
void showResetButton(bool show);
bool hasResetButton();
void setSliderStylesheet(const QString& styleSheet);

private slots:
void slotResetButtonClicked();
Expand Down
29 changes: 29 additions & 0 deletions ui/src/fixtureconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,28 @@ void FixtureConsole::setChecked(bool state, quint32 channel)
}
}

bool FixtureConsole::check(quint32 channel)
{
QListIterator <ConsoleChannel*> it(m_channels);
while (it.hasNext() == true)
{
ConsoleChannel* cc = it.next();
Q_ASSERT(cc != NULL);
if (channel == cc->channelIndex()){
cc->setChecked(!cc->isChecked());
return cc->isChecked();
}
}
return false;
}

bool FixtureConsole::isChecked(quint32 channel)
{
if((int)channel >= m_channels.count())
return false;
return m_channels.at(channel)->isChecked();
}

void FixtureConsole::setOutputDMX(bool state)
{
Q_UNUSED(state);
Expand Down Expand Up @@ -312,6 +334,13 @@ void FixtureConsole::setChannelStylesheet(quint32 ch, QString ss)
cc->setChannelStyleSheet(ss);
}

void FixtureConsole::setSliderStylesheet(quint32 ch, QString ss)
{
ConsoleChannel* cc = channel(ch);
if (cc != NULL)
cc->setSliderStylesheet(ss);
}

void FixtureConsole::resetChannelsStylesheet()
{
QListIterator <ConsoleChannel*> it(m_channels);
Expand Down
6 changes: 6 additions & 0 deletions ui/src/fixtureconsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ protected slots:
public:
/** Set channels' check state (UINT_MAX to set all) */
void setChecked(bool state, quint32 channel = UINT_MAX);
/** toggle check state */
bool check(quint32 channel);
/** get checkstate of channel */
bool isChecked(quint32 channel);

/** Enable/disable DMX output when sliders are dragged */
void setOutputDMX(bool state);
Expand All @@ -117,6 +121,8 @@ protected slots:

/** Set the stylesheet of the ConsoleChannel at the given index */
void setChannelStylesheet(quint32 ch, QString ss);
/** set the stylesheet of the slider of the channel at given index */
void setSliderStylesheet(quint32 ch, QString ss);

/** Reset all the channels stylesheet to the original value */
void resetChannelsStylesheet();
Expand Down
Loading