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

mcallegari / qlcplus / 19144422256

06 Nov 2025 05:33PM UTC coverage: 34.256% (-0.1%) from 34.358%
19144422256

push

github

mcallegari
Back to 5.1.0 debug

17718 of 51723 relevant lines covered (34.26%)

19528.23 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

28
}
201✔
29

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

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

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

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

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

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

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

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

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

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

78
    return false;
2✔
79
}
80

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

86
    return false;
2✔
87
}
88

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

94
    return false;
2✔
95
}
96

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

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

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