2 * Copyright (C) 2015 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17#include "fake_rangeinputfilter.h"
19FakeRangeInputFilter::FakeRangeInputFilter(const QString &id, const QString &tag, QObject* parent)
20 : unity::shell::scopes::RangeInputFilterInterface(parent),
23 m_hasStartValue(false),
28 connect(this, &FakeRangeInputFilter::hasStartValueChanged, this, &FakeRangeInputFilter::isActiveChanged);
29 connect(this, &FakeRangeInputFilter::hasEndValueChanged, this, &FakeRangeInputFilter::isActiveChanged);
32QString FakeRangeInputFilter::filterId() const
37QString FakeRangeInputFilter::filterTag() const
42QString FakeRangeInputFilter::title() const
47double FakeRangeInputFilter::startValue() const
52double FakeRangeInputFilter::endValue() const
57void FakeRangeInputFilter::setStartValue(double value)
59 if (m_startValue != value) {
61 Q_EMIT startValueChanged();
63 if (!m_hasStartValue) {
64 m_hasStartValue = true;
65 Q_EMIT hasStartValueChanged();
69void FakeRangeInputFilter::setEndValue(double value)
71 if (m_endValue != value) {
73 Q_EMIT endValueChanged();
77 Q_EMIT hasEndValueChanged();
81QString FakeRangeInputFilter::startPrefixLabel() const
83 return m_startPrefixLabel;
86QString FakeRangeInputFilter::startPostfixLabel() const
88 return m_startPostfixLabel;
91QString FakeRangeInputFilter::centralLabel() const
93 return m_centralLabel;
96QString FakeRangeInputFilter::endPrefixLabel() const
98 return m_endPrefixLabel;
101QString FakeRangeInputFilter::endPostfixLabel() const
103 return m_endPostfixLabel;
106bool FakeRangeInputFilter::hasStartValue() const
108 return m_hasStartValue;
111bool FakeRangeInputFilter::hasEndValue() const
113 return m_hasEndValue;
116void FakeRangeInputFilter::eraseStartValue()
118 m_hasStartValue = false;
119 Q_EMIT hasStartValueChanged();
122void FakeRangeInputFilter::eraseEndValue()
124 m_hasEndValue = false;
125 Q_EMIT hasEndValueChanged();
128bool FakeRangeInputFilter::isActive() const
130 return hasStartValue() && hasEndValue();
133void FakeRangeInputFilter::setTitle(const QString &title)
136 Q_EMIT titleChanged();
139void FakeRangeInputFilter::setStartPrefixLabel(const QString &startPrefixLabel)
141 m_startPrefixLabel = startPrefixLabel;
142 Q_EMIT startPrefixLabelChanged();
145void FakeRangeInputFilter::setStartPostfixLabel(const QString &startPostfixLabel)
147 m_startPostfixLabel = startPostfixLabel;
148 Q_EMIT startPostfixLabelChanged();
151void FakeRangeInputFilter::setCentralLabel(const QString ¢ralLabel)
153 m_centralLabel = centralLabel;
154 Q_EMIT centralLabelChanged();
157void FakeRangeInputFilter::setEndPrefixLabel(const QString &endPrefixLabel)
159 m_endPrefixLabel = endPrefixLabel;
160 Q_EMIT endPrefixLabelChanged();
163void FakeRangeInputFilter::setEndPostfixLabel(const QString &endPostfixLabel)
165 m_endPostfixLabel = endPostfixLabel;
166 Q_EMIT endPostfixLabelChanged();
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list