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

mcallegari / qlcplus / 16072648568

04 Jul 2025 11:22AM UTC coverage: 31.889% (-0.01%) from 31.899%
16072648568

push

github

mcallegari
engine: handle fixture definitions without modes (fix #1775)

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

3722 existing lines in 175 files now uncovered.

16453 of 51594 relevant lines covered (31.89%)

19305.2 hits per line

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

0.0
/ui/src/functionliveeditdialog.cpp
1
/*
2
  Q Light Controller Plus
3
  functionliveeditdialog.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 <QSettings>
21

22
#include "functionliveeditdialog.h"
23
#include "rgbmatrixeditor.h"
24
#include "chasereditor.h"
25
#include "sceneeditor.h"
26
#include "efxeditor.h"
27
#include "rgbmatrix.h"
28
#include "chaser.h"
29
#include "scene.h"
30
#include "doc.h"
31
#include "efx.h"
32

33
#define SETTINGS_GEOMETRY "funcliveedit/geometry"
34

35
FunctionLiveEditDialog::FunctionLiveEditDialog(Doc *doc, quint32 fid, QWidget *parent)
×
36
  : QDialog(parent)
37
  , m_doc(doc)
×
38
  , m_editor(NULL)
×
39
{
UNCOV
40
    Q_ASSERT(doc != NULL);
×
41

42
    Function *func = m_doc->function(fid);
×
UNCOV
43
    Q_ASSERT(func != NULL);
×
44

45
    setWindowTitle(tr("Function Live Edit"));
×
46
    setWindowIcon(QIcon(":/liveedit.png"));
×
47

48
    QSettings settings;
×
49
    QVariant var = settings.value(SETTINGS_GEOMETRY);
×
50
    if (var.isValid() == true)
×
51
        restoreGeometry(var.toByteArray());
×
52

53
    /* Master layout for toolbar and scroll area */
54
    new QVBoxLayout(this);
×
55
    setContentsMargins(0, 0, 0, 0);
×
56

57
    /* Scroll area that contains the editor widget */
58
    m_scrollArea = new QScrollArea(parent);
×
59
    m_scrollArea->setWidgetResizable(true);
×
60
    m_scrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
×
61
    layout()->addWidget(m_scrollArea);
×
62

63
    switch(func->type())
×
64
    {
65
        case Function::SceneType:
×
66
        {
UNCOV
67
            bool blindMode = true;
×
68
            if (func->isRunning())
×
UNCOV
69
                blindMode = false;
×
70
            SceneEditor *sceneEditor = new SceneEditor(m_scrollArea, qobject_cast<Scene*> (func), m_doc, true);
×
71
            sceneEditor->setBlindModeEnabled(blindMode);
×
72
            m_editor = sceneEditor;
×
73
        }
74
        break;
×
UNCOV
75
        case Function::ChaserType:
×
76
        case Function::SequenceType:
77
            m_editor = new ChaserEditor(m_scrollArea, qobject_cast<Chaser*> (func), m_doc, true);
×
78
        break;
×
UNCOV
79
        case Function::EFXType:
×
80
            m_editor = new EFXEditor(m_scrollArea, qobject_cast<EFX*> (func), m_doc);
×
81
        break;
×
UNCOV
82
        case Function::RGBMatrixType:
×
83
            m_editor = new RGBMatrixEditor(m_scrollArea, qobject_cast<RGBMatrix*> (func), m_doc);
×
84
        break;
×
UNCOV
85
        default:
×
UNCOV
86
        break;
×
87
    }
88

89
    if (m_editor != NULL)
×
90
    {
91
        m_scrollArea->setWidget(m_editor);
×
92
        m_editor->show();
×
93
        m_scrollArea->show();
×
94
    }
95
}
×
96

97
FunctionLiveEditDialog::~FunctionLiveEditDialog()
×
98
{
99
    QSettings settings;
×
100
    settings.setValue(SETTINGS_GEOMETRY, saveGeometry());
×
101
}
×
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