* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <extdef.h>
-#include <assert.h>
+#include <cassert>
#include <cmath>
#include <QApplication>
using std::make_shared;
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
const char *const ChannelNames[] = {
"CLK",
};
Signal::Signal(pv::Session &session,
- std::shared_ptr<data::SignalBase> channel) :
+ shared_ptr<data::SignalBase> channel) :
Trace(channel),
session_(session),
scale_handle_(make_shared<SignalScaleHandle>(*this)),
return base_;
}
+void Signal::save_settings(QSettings &settings) const
+{
+ (void)settings;
+}
+
+void Signal::restore_settings(QSettings &settings)
+{
+ (void)settings;
+}
+
const ViewItemOwner::item_list& Signal::child_items() const
{
return items_;
}
-void Signal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
+void Signal::paint_back(QPainter &p, ViewItemPaintParams &pp)
{
if (base_->enabled())
Trace::paint_back(p, pp);
void Signal::on_name_changed(const QString &text)
{
+ // On startup, this event is fired when a session restores signal
+ // names. However, the name widget hasn't yet been created.
+ if (!name_widget_)
+ return;
+
if (text != name_widget_->currentText())
name_widget_->setEditText(text);
owner_->extents_changed(true, true);
}
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv