#include "devices/hardwaredevice.hpp"
#include "dialogs/settings.hpp"
#include "globalsettings.hpp"
-#include "subwindows/decoder_selector/subwindow.hpp"
#include "toolbars/mainbar.hpp"
#include "util.hpp"
#include "views/trace/view.hpp"
#include "views/trace/standardbar.hpp"
+#ifdef ENABLE_DECODE
+#include "subwindows/decoder_selector/subwindow.hpp"
+#endif
+
#include <libsigrokcxx/libsigrokcxx.hpp>
using std::dynamic_pointer_cast;
QString title = "";
switch (type) {
+#ifdef ENABLE_DECODE
case subwindows::SubWindowTypeDecoderSelector:
title = tr("Decoder Selector");
+ break;
+#endif
+ default:
+ break;
}
QDockWidget* dock = new QDockWidget(title, main_window);
QMainWindow *dock_main = new QMainWindow(dock);
dock_main->setWindowFlags(Qt::Widget); // Remove Qt::Window flag
+#ifdef ENABLE_DECODE
if (type == subwindows::SubWindowTypeDecoderSelector)
v = make_shared<subwindows::decoder_selector::SubWindow>(session, dock_main);
+#endif
if (!v)
return nullptr;
void MainWindow::on_show_decoder_selector(Session *session)
{
+#ifdef ENABLE_DECODE
// Close dock widget if it's already showing and return
for (auto entry : sub_windows_) {
QDockWidget* dock = entry.first;
for (shared_ptr<Session> s : sessions_)
if (s.get() == session)
add_subwindow(subwindows::SubWindowTypeDecoderSelector, *s);
+#endif
}
void MainWindow::on_sub_window_close_clicked()