-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
43 lines (34 loc) · 1.03 KB
/
mainwindow.cpp
File metadata and controls
43 lines (34 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
IF= new interFace;
QString dir =QCoreApplication::applicationDirPath()+"/../datasets/";
Global *glob;// glob is a singleton containing dataset file directory
glob = Global::getInstance();
glob->globalFile=dir;
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_actionabout_triggered()
{
aboutDlg *adlg = new aboutDlg;
adlg->exec();
}
void MainWindow::on_actionHelp_triggered()
{
QString dirpath =QCoreApplication::applicationDirPath()+"/../doc/DA_Help.htm";
QUrl url;
qDebug()<<"path"<<dirpath;
url.setPath(dirpath);
// url.fromLocalFile(dirpath+"/doc/index.htm");
// url.fromLocalFile(QFileInfo("doc/index.htm").absoluteFilePath());
url.setScheme("file");
if ( !QDesktopServices::openUrl(url) )
qDebug() << "Failed to open url";
}