* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef ENABLE_DECODE
#include <libsigrokdecode/libsigrokdecode.h>
+#endif
#include <assert.h>
#include <limits.h>
#include "pv/data/logic.h"
#include "pv/data/logicsnapshot.h"
-using namespace boost;
-using namespace std;
+using boost::shared_ptr;
+using boost::weak_ptr;
+using std::deque;
+using std::list;
+using std::max;
+using std::min;
+using std::set;
+using std::vector;
namespace pv {
namespace view {
const double View::MaxScale = 1e9;
const double View::MinScale = 1e-15;
-const int View::RulerHeight = 30;
-
const int View::MaxScrollValue = INT_MAX / 2;
const int View::SignalHeight = 30;
{
const vector< shared_ptr<Signal> > sigs(
session().get_signals());
+#ifdef ENABLE_DECODE
const vector< shared_ptr<DecodeTrace> > decode_sigs(
session().get_decode_signals());
vector< shared_ptr<Trace> > traces(
sigs.size() + decode_sigs.size());
+#else
+ vector< shared_ptr<Trace> > traces(sigs.size());
+#endif
vector< shared_ptr<Trace> >::iterator i = traces.begin();
i = copy(sigs.begin(), sigs.end(), i);
+#ifdef ENABLE_DECODE
i = copy(decode_sigs.begin(), decode_sigs.end(), i);
+#endif
stable_sort(traces.begin(), traces.end(), compare_trace_v_offsets);
return traces;
void View::update_layout()
{
- setViewportMargins(_header->sizeHint().width(), RulerHeight, 0, 0);
+ setViewportMargins(_header->sizeHint().width(),
+ _ruler->sizeHint().height(), 0, 0);
_ruler->setGeometry(_viewport->x(), 0,
_viewport->width(), _viewport->y());
_header->setGeometry(0, _viewport->y(),
offset += SignalHeight + 2 * SignalMargin;
}
- setViewportMargins(_header->sizeHint().width(), RulerHeight, 0, 0);
+ update_layout();
normalize_layout();
}