projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b781f80
)
RowItem: Combined appearance change signals into appearance_changed()
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Fri, 10 Oct 2014 20:27:41 +0000
(21:27 +0100)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Wed, 19 Nov 2014 10:23:02 +0000
(10:23 +0000)
CMakeLists.txt
patch
|
blob
|
history
pv/view/rowitem.h
patch
|
blob
|
history
pv/view/signal.cpp
patch
|
blob
|
history
pv/view/trace.cpp
patch
|
blob
|
history
pv/view/trace.h
patch
|
blob
|
history
pv/view/viewport.cpp
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index 0ef18566cec4f6db9f63d950683abd0af9a85fc4..8e2ac69505984c9094cf2c98d54f2dd39962d1f9 100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-204,6
+204,7
@@
set(pulseview_HEADERS
pv/view/header.h
pv/view/logicsignal.h
pv/view/marginwidget.h
pv/view/header.h
pv/view/logicsignal.h
pv/view/marginwidget.h
+ pv/view/rowitem.h
pv/view/ruler.h
pv/view/selectableitem.h
pv/view/signal.h
pv/view/ruler.h
pv/view/selectableitem.h
pv/view/signal.h
diff --git
a/pv/view/rowitem.h
b/pv/view/rowitem.h
index 90036389dd39dea17d04d860d2422a1bc474bcc3..161e828917aec9ea8acb98ad8550898fd252c7c8 100644
(file)
--- a/
pv/view/rowitem.h
+++ b/
pv/view/rowitem.h
@@
-30,6
+30,8
@@
class RowItemOwner;
class RowItem : public SelectableItem
{
class RowItem : public SelectableItem
{
+ Q_OBJECT
+
public:
/**
* Constructor.
public:
/**
* Constructor.
@@
-111,6
+113,9
@@
public:
public:
virtual void hover_point_changed();
public:
virtual void hover_point_changed();
+Q_SIGNALS:
+ void appearance_changed();
+
protected:
pv::view::RowItemOwner *_owner;
protected:
pv::view::RowItemOwner *_owner;
diff --git
a/pv/view/signal.cpp
b/pv/view/signal.cpp
index fab76fcfd1f1fcbf593d3cb853eff457ba70f8cb..cbd5ac423b9b23d94bf27cbd0b02c5c5ed381db3 100644
(file)
--- a/
pv/view/signal.cpp
+++ b/
pv/view/signal.cpp
@@
-85,7
+85,7
@@
bool Signal::enabled() const
void Signal::enable(bool enable)
{
_channel->set_enabled(enable);
void Signal::enable(bool enable)
{
_channel->set_enabled(enable);
-
visibility
_changed();
+
appearance
_changed();
}
shared_ptr<Channel> Signal::channel() const
}
shared_ptr<Channel> Signal::channel() const
diff --git
a/pv/view/trace.cpp
b/pv/view/trace.cpp
index 3409ecf75cb7a471dba4ebe73b6adf5532cf4762..3b92abe484c14efd5964789eed731077fed21344 100644
(file)
--- a/
pv/view/trace.cpp
+++ b/
pv/view/trace.cpp
@@
-223,13
+223,13
@@
void Trace::on_popup_closed()
void Trace::on_text_changed(const QString &text)
{
set_name(text);
void Trace::on_text_changed(const QString &text)
{
set_name(text);
-
text
_changed();
+
appearance
_changed();
}
void Trace::on_colour_changed(const QColor &colour)
{
set_colour(colour);
}
void Trace::on_colour_changed(const QColor &colour)
{
set_colour(colour);
-
colour
_changed();
+
appearance
_changed();
}
} // namespace view
}
} // namespace view
diff --git
a/pv/view/trace.h
b/pv/view/trace.h
index 7fd8c67afb8e917a5384d27fe87b61edd996c7b0..83eb826546184e87e91005a7e461cb9e1f8bc5fc 100644
(file)
--- a/
pv/view/trace.h
+++ b/
pv/view/trace.h
@@
-126,11
+126,6
@@
private Q_SLOTS:
void on_popup_closed();
void on_popup_closed();
-Q_SIGNALS:
- void visibility_changed();
- void text_changed();
- void colour_changed();
-
protected:
QString _name;
QColor _colour;
protected:
QString _name;
QColor _colour;
diff --git
a/pv/view/viewport.cpp
b/pv/view/viewport.cpp
index afff74eec85c17f5d1db0845d91a1f37e1660ffe..221714051504a81a7e48b47056217d98f67e05cb 100644
(file)
--- a/
pv/view/viewport.cpp
+++ b/
pv/view/viewport.cpp
@@
-229,7
+229,7
@@
void Viewport::on_signals_changed()
{
for (shared_ptr<RowItem> r : _view) {
assert(r);
{
for (shared_ptr<RowItem> r : _view) {
assert(r);
- connect(r.get(), SIGNAL(
visibility
_changed()),
+ connect(r.get(), SIGNAL(
appearance
_changed()),
this, SLOT(update()));
}
}
this, SLOT(update()));
}
}