• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mcallegari / qlcplus / 14809507932

03 May 2025 09:13AM UTC coverage: 31.879% (+0.03%) from 31.845%
14809507932

push

github

web-flow
Merge pull request #1745 from mcallegari/qmluiqt6

Port QML UI to Qt6

2 of 9 new or added lines in 3 files covered. (22.22%)

3720 existing lines in 174 files now uncovered.

16422 of 51513 relevant lines covered (31.88%)

19079.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/ui/src/groupsconsole.cpp
1
/*
2
  Q Light Controller
3
  groupsconsole.cpp
4

5
  Copyright (c) Massimo Callegari
6

7
  Licensed under the Apache License, Version 2.0 (the "License");
8
  you may not use this file except in compliance with the License.
9
  You may obtain a copy of the License at
10

11
      http://www.apache.org/licenses/LICENSE-2.0.txt
12

13
  Unless required by applicable law or agreed to in writing, software
14
  distributed under the License is distributed on an "AS IS" BASIS,
15
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
  See the License for the specific language governing permissions and
17
  limitations under the License.
18
*/
19

20
#include <QHBoxLayout>
21
#include <QToolButton>
22
#include <QSpinBox>
23
#include <QSlider>
24
#include <QDebug>
25
#include <QIcon>
26
#include <QList>
27

28
#include "consolechannel.h"
29
#include "clickandgoslider.h"
30
#include "groupsconsole.h"
31
#include "doc.h"
32

33
/*****************************************************************************
34
 * Initialization
35
 *****************************************************************************/
36

37
GroupsConsole::GroupsConsole(QWidget* parent, Doc* doc, QList <quint32> ids, QList<uchar> levels)
×
38
    : QWidget(parent)
39
    , m_doc(doc)
×
40
    , m_ids(ids)
×
41
    , m_levels(levels)
×
42
{
UNCOV
43
    Q_ASSERT(doc != NULL);
×
44
    new QHBoxLayout(this);
×
45

46
    init();
×
47
}
×
48

49
GroupsConsole::~GroupsConsole()
×
50
{
51
}
×
52

53
QList<ConsoleChannel *> GroupsConsole::groups()
×
54
{
55
    return m_groups;
×
56
}
57

58
void GroupsConsole::init()
×
59
{
UNCOV
60
    int idx = 0;
×
61
    foreach (quint32 id, m_ids)
×
62
    {
63
        ChannelsGroup *grp = m_doc->channelsGroup(id);
×
64
        if (grp != NULL && grp->getChannels().count() > 0)
×
65
        {
66
            SceneValue scv = grp->getChannels().at(0);
×
67

68
            ConsoleChannel* cc = new ConsoleChannel(this, m_doc, scv.fxi, scv.channel, false);
×
69
            cc->setLabel(grp->name());
×
70
            cc->setChannelsGroup(id);
×
71
            cc->setChannelStyleSheet(CNG_DEFAULT_STYLE);
×
72
            if (idx < m_levels.count())
×
73
                cc->setValue(m_levels.at(idx));
×
74
            layout()->addWidget(cc);
×
75
            m_groups.append(cc);
×
76

77
            connect(cc, SIGNAL(groupValueChanged(quint32, uchar)),
×
78
                    this, SIGNAL(groupValueChanged(quint32, uchar)));
79
            idx++;
×
80
        }
×
UNCOV
81
    }
×
82
    /* Make a spacer item eat excess space to justify channels left */
83
    layout()->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding));
×
84
}
×
85

86

87

88

89

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc