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

mcallegari / qlcplus / 21760395819

06 Feb 2026 05:52PM UTC coverage: 33.994% (-0.08%) from 34.078%
21760395819

push

github

mcallegari
Back to 5.2.1 debug

17635 of 51877 relevant lines covered (33.99%)

19809.79 hits per line

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

93.33
/engine/src/qlcclipboard.cpp
1
/*
2
  Q Light Controller Plus
3
  qlcclipboard.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 "qlcclipboard.h"
21
#include "doc.h"
22

23
QLCClipboard::QLCClipboard(Doc *doc)
201✔
24
    : m_doc(doc)
201✔
25
    , m_copyFunction(NULL)
201✔
26
{
27
}
201✔
28

29
void QLCClipboard::resetContents()
487✔
30
{
31
    m_copySteps.clear();
487✔
32
    m_copySceneValues.clear();
487✔
33
    if (m_copyFunction != NULL && m_doc->function(m_copyFunction->id()) == NULL)
487✔
34
        delete m_copyFunction;
×
35
    m_copyFunction = NULL;
487✔
36
}
487✔
37

38
void QLCClipboard::copyContent(quint32 sourceID, QList<ChaserStep> steps)
2✔
39
{
40
    Q_UNUSED(sourceID)
41

42
    m_copySteps = steps;
2✔
43
}
2✔
44

45
void QLCClipboard::copyContent(quint32 sourceID, QList<SceneValue> values)
1✔
46
{
47
    Q_UNUSED(sourceID)
48

49
    m_copySceneValues = values;
1✔
50
}
1✔
51

52
void QLCClipboard::copyContent(quint32 sourceID, Function *function)
1✔
53
{
54
    Q_UNUSED(sourceID)
55

56
    if (function == NULL)
1✔
57
        return;
×
58

59
    if (m_copyFunction != NULL && m_doc->function(m_copyFunction->id()) == NULL)
1✔
60
        delete m_copyFunction;
×
61
    m_copyFunction = NULL;
1✔
62

63
    /* Attempt to create a copy of the function to Doc */
64
    Function* copy = function->createCopy(m_doc, false);
1✔
65
    if (copy != NULL)
1✔
66
    {
67
        copy->setName(tr("Copy of %1").arg(function->name()));
1✔
68
        m_copyFunction = copy;
1✔
69
    }
70
}
71

72
bool QLCClipboard::hasChaserSteps()
3✔
73
{
74
    if (m_copySteps.count() > 0)
3✔
75
        return true;
1✔
76

77
    return false;
2✔
78
}
79

80
bool QLCClipboard::hasSceneValues()
3✔
81
{
82
    if (m_copySceneValues.count() > 0)
3✔
83
        return true;
1✔
84

85
    return false;
2✔
86
}
87

88
bool QLCClipboard::hasFunction()
3✔
89
{
90
    if (m_copyFunction != NULL)
3✔
91
        return true;
1✔
92

93
    return false;
2✔
94
}
95

96
QList<ChaserStep> QLCClipboard::getChaserSteps()
1✔
97
{
98
    return m_copySteps;
1✔
99
}
100

101
QList<SceneValue> QLCClipboard::getSceneValues()
1✔
102
{
103
    return m_copySceneValues;
1✔
104
}
105

106
Function *QLCClipboard::getFunction()
2✔
107
{
108
    return m_copyFunction;
2✔
109
}
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