Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,10 @@ add_executable(dlt-viewer
fileexplorertab.ui
fileexplorertab.h
fileexplorertab.cpp
applicationdialog.ui
contextdialog.ui
ecudialog.ui
exporterdialog.ui
fileexplorertab.ui
filterdialog.ui
injectiondialog.ui
jumptodialog.ui
mainwindow.ui
multiplecontextdialog.ui
plugindialog.ui

searchform.ui
settingsdialog.ui
searchdialog.ui
applicationdialog.ui contextdialog.ui ecudialog.ui exporterdialog.ui fileexplorertab.ui filterdialog.ui injectiondialog.ui jumptodialog.ui mainwindow.ui multiplecontextdialog.ui plugindialog.ui searchdialog.ui searchform.ui settingsdialog.ui
updatechecker.h
updatechecker.cpp
)

target_link_libraries(dlt-viewer
Expand Down
18 changes: 15 additions & 3 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#include "qdltctrlmsg.h"
#include <qdltmsgwrapper.h>
#include "ecutree.h"

#include "updatechecker.h"

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
Expand All @@ -87,6 +87,7 @@ MainWindow::MainWindow(QWidget *parent) :
pulseButtonColor(255, 40, 40),
isSearchOngoing(false)
{

dltIndexer = NULL;
settings = QDltSettingsManager::getInstance();
ui->setupUi(this);
Expand All @@ -111,7 +112,6 @@ MainWindow::MainWindow(QWidget *parent) :

initFileHandling();


/* Commands plugin after loading log file */
qDebug() << "### Plugin commands after loading log file";
if(!QDltOptManager::getInstance()->getPostPluginCommands().isEmpty())
Expand Down Expand Up @@ -196,6 +196,7 @@ MainWindow::MainWindow(QWidget *parent) :
qDebug() << "Start minimzed as defined in the settings";
this->setWindowState(Qt::WindowMinimized);
}

}

MainWindow::~MainWindow()
Expand Down Expand Up @@ -280,6 +281,10 @@ void MainWindow::initState()
settingsDlg->assertSettingsVersion();
settingsDlg->readSettings();

/* Update Checker call for timer to check if there is any new update*/
updChecker = new UpdateChecker(this);
updChecker->startAutoCheck();

if (QDltSettingsManager::UI_Colour::UI_Dark == QDltSettingsManager::getInstance()->uiColour)
{
qApp->setStyle(QStyleFactory::create("Fusion"));
Expand Down Expand Up @@ -530,6 +535,7 @@ void MainWindow::initView()
addFilter->setShortcut((Qt::SHIFT | Qt::CTRL) | Qt::Key_A);
connect(addFilter, SIGNAL(triggered()), this, SLOT(on_action_menuFilter_Add_triggered()));
addAction(addFilter);

}

void MainWindow::initSignalConnections()
Expand Down Expand Up @@ -843,6 +849,7 @@ void MainWindow::initFileHandling()
// normally load log file mutithreaded
reloadLogFile();
}

}


Expand Down Expand Up @@ -5389,7 +5396,7 @@ void MainWindow::on_actionShortcuts_List_triggered(){
const QString shortcutCollapseAllECU = "Ctrl+";
const QString shortcutCopyPayload = "Ctrl + P";
const QString shortcutInfo = "F1";
const QString shortcutQuit = "Ctrl +- Q";
const QString shortcutQuit = "Ctrl + Q";

// Store shortcuts dynamically using a list of pairs
QList<QPair<QString, QString>> shortcutsList = {
Expand Down Expand Up @@ -5444,6 +5451,11 @@ void MainWindow::on_actionShortcuts_List_triggered(){
delete shortcutDialog;
}


void MainWindow::on_actionCheck_For_Latest_Updates_triggered(){
updChecker->linkToUrl();
}

void MainWindow::on_pluginWidget_itemSelectionChanged()
{
QList<QTreeWidgetItem *> list = project.plugin->selectedItems();
Expand Down
5 changes: 5 additions & 0 deletions src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include "searchtablemodel.h"
#include "ui_mainwindow.h"
#include "searchform.h"
#include "updatechecker.h"

/**
* @brief Namespace to contain the toolbar positions.
Expand Down Expand Up @@ -162,6 +163,9 @@ class MainWindow : public QMainWindow
SettingsDialog *settingsDlg;
QDltSettingsManager *settings;

/* Update Checker class for automatic pop up for new updates*/
UpdateChecker *updChecker;

/* injections */
QString injectionAplicationId;
QString injectionContextId;
Expand Down Expand Up @@ -460,6 +464,7 @@ private slots:
void on_action_menuHelp_Info_triggered();
void on_action_menuHelp_Command_Line_triggered();
void on_actionShortcuts_List_triggered();
void on_actionCheck_For_Latest_Updates_triggered();

// Config methods
void on_action_menuConfig_Context_Delete_triggered();
Expand Down
64 changes: 35 additions & 29 deletions src/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
<enum>Qt::FocusPolicy::NoFocus</enum>
</property>
<property name="windowTitle">
<string>MainWindow</string>
Expand All @@ -21,7 +21,7 @@
<normaloff>:/icons/png/org.genivi.DLTViewer.png</normaloff>:/icons/png/org.genivi.DLTViewer.png</iconset>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
<enum>QTabWidget::TabShape::Rounded</enum>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout">
Expand All @@ -45,10 +45,10 @@
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
<enum>Qt::ContextMenuPolicy::CustomContextMenu</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
<enum>QAbstractScrollArea::SizeAdjustPolicy::AdjustToContentsOnFirstShow</enum>
</property>
<property name="autoScroll">
<bool>false</bool>
Expand All @@ -60,13 +60,13 @@
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
<enum>QAbstractItemView::SelectionMode::ExtendedSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
<enum>QAbstractItemView::SelectionBehavior::SelectRows</enum>
</property>
<property name="horizontalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
<enum>QAbstractItemView::ScrollMode::ScrollPerPixel</enum>
</property>
<property name="wordWrap">
<bool>false</bool>
Expand All @@ -93,7 +93,7 @@
<x>0</x>
<y>0</y>
<width>1001</width>
<height>23</height>
<height>26</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
Expand Down Expand Up @@ -212,6 +212,7 @@
<addaction name="separator"/>
<addaction name="action_menuHelp_Command_Line"/>
<addaction name="actionShortcuts_List"/>
<addaction name="actionCheck_For_Latest_Updates"/>
</widget>
<widget class="QMenu" name="menuDLT">
<property name="title">
Expand Down Expand Up @@ -311,10 +312,10 @@
<widget class="QStatusBar" name="statusBar"/>
<widget class="QDockWidget" name="dockWidgetProject">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
<enum>Qt::FocusPolicy::NoFocus</enum>
</property>
<property name="features">
<set>QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
<set>QDockWidget::DockWidgetFeature::DockWidgetClosable|QDockWidget::DockWidgetFeature::DockWidgetFloatable|QDockWidget::DockWidgetFeature::DockWidgetMovable</set>
</property>
<property name="windowTitle">
<string>Project</string>
Expand All @@ -324,7 +325,7 @@
</attribute>
<widget class="QWidget" name="dockWidgetContents">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
<enum>Qt::FocusPolicy::NoFocus</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
Expand All @@ -342,10 +343,10 @@
<item>
<widget class="QFrame" name="enableConfigFrame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
<enum>QFrame::Shape::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
<enum>QFrame::Shadow::Plain</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="1">
Expand Down Expand Up @@ -439,26 +440,26 @@
<bool>true</bool>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
<enum>Qt::FocusPolicy::TabFocus</enum>
</property>
<property name="tabPosition">
<enum>QTabWidget::South</enum>
<enum>QTabWidget::TabPosition::South</enum>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
<enum>QTabWidget::TabShape::Rounded</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="elideMode">
<enum>Qt::ElideNone</enum>
<enum>Qt::TextElideMode::ElideNone</enum>
</property>
<property name="movable">
<bool>false</bool>
</property>
<widget class="FileExplorerTab" name="tabExplore">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
<enum>Qt::FocusPolicy::NoFocus</enum>
</property>
<attribute name="title">
<string>Explore</string>
Expand All @@ -480,7 +481,7 @@
</widget>
<widget class="QWidget" name="tabConfig">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
<enum>Qt::FocusPolicy::NoFocus</enum>
</property>
<attribute name="title">
<string>Config</string>
Expand All @@ -501,19 +502,19 @@
<item>
<widget class="QTreeWidget" name="configWidget">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
<enum>Qt::FocusPolicy::TabFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
<enum>Qt::ContextMenuPolicy::CustomContextMenu</enum>
</property>
<property name="tabKeyNavigation">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
<enum>QAbstractItemView::SelectionMode::ExtendedSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
<enum>QAbstractItemView::SelectionBehavior::SelectRows</enum>
</property>
<property name="rootIsDecorated">
<bool>true</bool>
Expand Down Expand Up @@ -574,7 +575,7 @@
<item>
<widget class="PluginTreeWidget" name="pluginWidget">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
<enum>Qt::ContextMenuPolicy::CustomContextMenu</enum>
</property>
<property name="tabKeyNavigation">
<bool>true</bool>
Expand Down Expand Up @@ -690,7 +691,7 @@
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
<enum>Qt::ContextMenuPolicy::CustomContextMenu</enum>
</property>
<property name="acceptDrops">
<bool>true</bool>
Expand All @@ -699,13 +700,13 @@
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::InternalMove</enum>
<enum>QAbstractItemView::DragDropMode::InternalMove</enum>
</property>
<property name="defaultDropAction">
<enum>Qt::MoveAction</enum>
<enum>Qt::DropAction::MoveAction</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
<enum>QAbstractItemView::SelectionMode::ExtendedSelection</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
Expand Down Expand Up @@ -782,7 +783,7 @@
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
<enum>Qt::ContextMenuPolicy::CustomContextMenu</enum>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
Expand Down Expand Up @@ -1606,6 +1607,11 @@
<string>Shortcuts List</string>
</property>
</action>
<action name="actionCheck_For_Latest_Updates">
<property name="text">
<string>Check For Latest Updates</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
Expand Down
Loading