X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;ds=sidebyside;f=pv%2Fviews%2Fviewbase.cpp;fp=pv%2Fviews%2Fviewbase.cpp;h=382e1154727cfc3d8a4e0dfbc24ac7fb46d741fc;hb=f4e57597347e47a4ea58fbdc7b0a22e07f1c0ede;hp=0000000000000000000000000000000000000000;hpb=90d77e35b43fb7fdffc800945761bf95ba9faf02;p=pulseview.git diff --git a/pv/views/viewbase.cpp b/pv/views/viewbase.cpp new file mode 100644 index 0000000..382e115 --- /dev/null +++ b/pv/views/viewbase.cpp @@ -0,0 +1,110 @@ +/* + * This file is part of the PulseView project. + * + * Copyright (C) 2012 Joel Holdsworth + * Copyright (C) 2016 Soeren Apel + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * 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 + */ + +#ifdef ENABLE_DECODE +#include +#endif + +#include + +#include "pv/session.hpp" +#include "pv/util.hpp" + +using std::shared_ptr; + +namespace pv { +namespace views { + +ViewBase::ViewBase(Session &session, QWidget *parent) : + session_(session) +{ + (void)parent; + + connect(&session_, SIGNAL(signals_changed()), + this, SLOT(signals_changed())); + connect(&session_, SIGNAL(capture_state_changed(int)), + this, SLOT(capture_state_updated(int))); + connect(&session_, SIGNAL(data_received()), + this, SLOT(data_updated())); + connect(&session_, SIGNAL(frame_ended()), + this, SLOT(data_updated())); +} + +Session& ViewBase::session() +{ + return session_; +} + +const Session& ViewBase::session() const +{ + return session_; +} + +void ViewBase::clear_signals() +{ +} + +#ifdef ENABLE_DECODE +void ViewBase::clear_decode_signals() +{ +} + +void ViewBase::add_decode_signal(shared_ptr signalbase) +{ + (void)signalbase; +} + +void ViewBase::remove_decode_signal(shared_ptr signalbase) +{ + (void)signalbase; +} +#endif + +void ViewBase::save_settings(QSettings &settings) const +{ + (void)settings; +} + +void ViewBase::restore_settings(QSettings &settings) +{ + (void)settings; +} + +void ViewBase::trigger_event(util::Timestamp location) +{ + (void)location; +} + +void ViewBase::signals_changed() +{ +} + +void ViewBase::capture_state_updated(int state) +{ + (void)state; +} + +void ViewBase::data_updated() +{ +} + +} // namespace view +} // namespace pv