mirror of
https://github.com/Indy970/QtHPConnect
synced 2024-12-25 21:59:15 +01:00
General Update
This commit is contained in:
parent
0af9b39b3b
commit
58d49f4829
4 changed files with 25 additions and 7 deletions
|
@ -12,3 +12,9 @@ The sync version of libusb is applied, but ultimately the async routines will be
|
||||||
|
|
||||||
If anyone wants to help, or has a description of the protocol, you are very welcome to get involved
|
If anyone wants to help, or has a description of the protocol, you are very welcome to get involved
|
||||||
|
|
||||||
|
Depends libusb-dev
|
||||||
|
Depends libhidapi-libusb
|
||||||
|
|
||||||
|
Note : udev/rules.d
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", MODE="0666"
|
||||||
|
SUBSYSTEM=="usb_device", ATTRS{idVendor}=="03f0", MODE="0666"
|
||||||
|
|
|
@ -575,6 +575,6 @@ hpTreeItem::~hpTreeItem() {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
qDebug()<<"hpTreeItem:: delete";
|
//qDebug()<<"hpTreeItem:: delete";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
hpusb.h
2
hpusb.h
|
@ -1,7 +1,7 @@
|
||||||
#ifndef HPUSB_H
|
#ifndef HPUSB_H
|
||||||
#define HPUSB_H
|
#define HPUSB_H
|
||||||
|
|
||||||
#include <libusb.h>
|
#include <libusb-1.0/libusb.h>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
|
|
|
@ -381,7 +381,19 @@ void MainWindow::setContentWindow() {
|
||||||
// contentModel.iconProvider()->setOptions(QFileIconProvider::DontUseCustomDirectoryIcons);
|
// contentModel.iconProvider()->setOptions(QFileIconProvider::DontUseCustomDirectoryIcons);
|
||||||
|
|
||||||
ui->tvContent->setModel(&contentModel);
|
ui->tvContent->setModel(&contentModel);
|
||||||
|
|
||||||
|
QDir dir(path);
|
||||||
|
|
||||||
|
if (!dir.exists()) {
|
||||||
|
qDebug()<<"Content Path Does not Exist:"<<path;
|
||||||
|
if(!dir.mkpath("."))
|
||||||
|
{
|
||||||
|
qDebug()<<"Path could not be created"<<path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!path.isEmpty()) {
|
if (!path.isEmpty()) {
|
||||||
|
qDebug()<<"Content Path Empty:"<<path;
|
||||||
const QModelIndex rootIndex = contentModel.index(QDir::cleanPath(path));
|
const QModelIndex rootIndex = contentModel.index(QDir::cleanPath(path));
|
||||||
if (rootIndex.isValid()) {
|
if (rootIndex.isValid()) {
|
||||||
ui->tvContent->setRootIndex(rootIndex);
|
ui->tvContent->setRootIndex(rootIndex);
|
||||||
|
@ -496,7 +508,7 @@ void MainWindow::setTimerStopped() {
|
||||||
void MainWindow::closeEvent(QCloseEvent *event)
|
void MainWindow::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
|
|
||||||
qDebug()<<"MainWindow:: closeEvent Step 1";
|
//qDebug()<<"MainWindow:: closeEvent Step 1";
|
||||||
writeSettings();
|
writeSettings();
|
||||||
|
|
||||||
//stop the timer pulse
|
//stop the timer pulse
|
||||||
|
@ -505,7 +517,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
||||||
event->accept();
|
event->accept();
|
||||||
close();
|
close();
|
||||||
|
|
||||||
qDebug()<<"MainWindow:: closeEvent Step 2";
|
//qDebug()<<"MainWindow:: closeEvent Step 2";
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::writeSettings()
|
void MainWindow::writeSettings()
|
||||||
|
@ -639,7 +651,7 @@ void MainWindow::on_tvCalculators_customContextMenuRequested(const QPoint &pos)
|
||||||
//destructor
|
//destructor
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
qDebug()<<"MainWindow:: closeEvent Step 3";
|
//qDebug()<<"MainWindow:: closeEvent Step 3";
|
||||||
|
|
||||||
ui->tvCalculators->close();
|
ui->tvCalculators->close();
|
||||||
ui->tvContent->close();
|
ui->tvContent->close();
|
||||||
|
@ -648,7 +660,7 @@ MainWindow::~MainWindow()
|
||||||
ui->dwMessenger->close();
|
ui->dwMessenger->close();
|
||||||
ui->dwCalculator->close();
|
ui->dwCalculator->close();
|
||||||
|
|
||||||
qDebug()<<"MainWindow:: closeEvent Step 4";
|
//qDebug()<<"MainWindow:: closeEvent Step 4";
|
||||||
|
|
||||||
if (main_err!=nullptr) {
|
if (main_err!=nullptr) {
|
||||||
delete main_err;
|
delete main_err;
|
||||||
|
@ -660,7 +672,7 @@ MainWindow::~MainWindow()
|
||||||
myModel=nullptr;
|
myModel=nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug()<<"MainWindow:: closeEvent Step 5";
|
//qDebug()<<"MainWindow:: closeEvent Step 5";
|
||||||
|
|
||||||
|
|
||||||
//might need a mechanism to inform eventThread that the comms module is closed
|
//might need a mechanism to inform eventThread that the comms module is closed
|
||||||
|
|
Loading…
Reference in a new issue