add of web button to index.html
This commit is contained in:
parent
cf486f6e68
commit
d69d10605e
@ -18,6 +18,9 @@
|
|||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include "web.h"
|
#include "web.h"
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QUrl>
|
||||||
|
#include <QFileInfo>
|
||||||
|
|
||||||
int MainWindow::indexPath = 0;
|
int MainWindow::indexPath = 0;
|
||||||
|
|
||||||
@ -1050,3 +1053,22 @@ void MainWindow::on_addStep_clicked()
|
|||||||
|
|
||||||
void MainWindow::on_actionExit_triggered() { QApplication::quit(); }
|
void MainWindow::on_actionExit_triggered() { QApplication::quit(); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::openIndexSite() {
|
||||||
|
QString filePath = "index.html";
|
||||||
|
QFileInfo fileInfo(filePath);
|
||||||
|
|
||||||
|
if (fileInfo.exists() && fileInfo.isFile()) {
|
||||||
|
QDesktopServices::openUrl(QUrl::fromLocalFile(fileInfo.absoluteFilePath()));
|
||||||
|
} else {
|
||||||
|
QMessageBox::warning(this, "Erreur", "Le fichier index.html n'existe pas.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionWeb_triggered()
|
||||||
|
{
|
||||||
|
this->openIndexSite();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,6 +53,7 @@ public:
|
|||||||
void newPath();
|
void newPath();
|
||||||
void extractDialogue();
|
void extractDialogue();
|
||||||
bool m_handlingUndoRedo = false;
|
bool m_handlingUndoRedo = false;
|
||||||
|
void openIndexSite();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_pushButton_clicked();
|
void on_pushButton_clicked();
|
||||||
@ -127,6 +128,8 @@ private slots:
|
|||||||
|
|
||||||
void on_actionExit_triggered();
|
void on_actionExit_triggered();
|
||||||
|
|
||||||
|
void on_actionWeb_triggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
QString currentFile;
|
QString currentFile;
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Shape::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
<item>
|
<item>
|
||||||
@ -262,7 +262,7 @@
|
|||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/add.png</normaloff>:/data/images/data/images/add.png</iconset>
|
<normaloff>:/data/images/data/images/add.png</normaloff>:/data/images/data/images/add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -333,7 +333,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Shape::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
@ -361,7 +361,7 @@
|
|||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/add.png</normaloff>:/data/images/data/images/add.png</iconset>
|
<normaloff>:/data/images/data/images/add.png</normaloff>:/data/images/data/images/add.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -484,7 +484,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>22</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
@ -495,6 +495,7 @@
|
|||||||
<addaction name="actionOpen"/>
|
<addaction name="actionOpen"/>
|
||||||
<addaction name="actionSave"/>
|
<addaction name="actionSave"/>
|
||||||
<addaction name="actionSave_as"/>
|
<addaction name="actionSave_as"/>
|
||||||
|
<addaction name="actionWeb"/>
|
||||||
<addaction name="actionExit"/>
|
<addaction name="actionExit"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuEdit">
|
<widget class="QMenu" name="menuEdit">
|
||||||
@ -579,110 +580,110 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionNewFile">
|
<action name="actionNewFile">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/new.png</normaloff>:/data/images/data/images/new.png</iconset>
|
<normaloff>:/data/images/data/images/new.png</normaloff>:/data/images/data/images/new.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>New File</string>
|
<string>New File</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::MenuRole::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSaveFile">
|
<action name="actionSaveFile">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/save_as.png</normaloff>:/data/images/data/images/save_as.png</iconset>
|
<normaloff>:/data/images/data/images/save_as.png</normaloff>:/data/images/data/images/save_as.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Save</string>
|
<string>Save</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::MenuRole::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSaveAsFile">
|
<action name="actionSaveAsFile">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/save.png</normaloff>:/data/images/data/images/save.png</iconset>
|
<normaloff>:/data/images/data/images/save.png</normaloff>:/data/images/data/images/save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Save as</string>
|
<string>Save as</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::MenuRole::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditCopy">
|
<action name="actionEditCopy">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/copy.png</normaloff>:/data/images/data/images/copy.png</iconset>
|
<normaloff>:/data/images/data/images/copy.png</normaloff>:/data/images/data/images/copy.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Copy</string>
|
<string>Copy</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::MenuRole::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditPaste">
|
<action name="actionEditPaste">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/paste.png</normaloff>:/data/images/data/images/paste.png</iconset>
|
<normaloff>:/data/images/data/images/paste.png</normaloff>:/data/images/data/images/paste.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Paste</string>
|
<string>Paste</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::MenuRole::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditCut">
|
<action name="actionEditCut">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/cut.png</normaloff>:/data/images/data/images/cut.png</iconset>
|
<normaloff>:/data/images/data/images/cut.png</normaloff>:/data/images/data/images/cut.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Cut</string>
|
<string>Cut</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::MenuRole::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditUndo">
|
<action name="actionEditUndo">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/edit_undo.png</normaloff>:/data/images/data/images/edit_undo.png</iconset>
|
<normaloff>:/data/images/data/images/edit_undo.png</normaloff>:/data/images/data/images/edit_undo.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Undo</string>
|
<string>Undo</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::MenuRole::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionEditRedo">
|
<action name="actionEditRedo">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/edit_redo.png</normaloff>:/data/images/data/images/edit_redo.png</iconset>
|
<normaloff>:/data/images/data/images/edit_redo.png</normaloff>:/data/images/data/images/edit_redo.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Redo</string>
|
<string>Redo</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::MenuRole::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionopenFile">
|
<action name="actionopenFile">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/open.png</normaloff>:/data/images/data/images/open.png</iconset>
|
<normaloff>:/data/images/data/images/open.png</normaloff>:/data/images/data/images/open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Open file</string>
|
<string>Open file</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuRole">
|
<property name="menuRole">
|
||||||
<enum>QAction::MenuRole::NoRole</enum>
|
<enum>QAction::NoRole</enum>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionNew">
|
<action name="actionNew">
|
||||||
@ -735,7 +736,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionColor">
|
<action name="actionColor">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/font-color.png</normaloff>:/data/images/data/images/font-color.png</iconset>
|
<normaloff>:/data/images/data/images/font-color.png</normaloff>:/data/images/data/images/font-color.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -744,7 +745,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionBold">
|
<action name="actionBold">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/bold.png</normaloff>:/data/images/data/images/bold.png</iconset>
|
<normaloff>:/data/images/data/images/bold.png</normaloff>:/data/images/data/images/bold.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -753,7 +754,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionItalic">
|
<action name="actionItalic">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/italic.png</normaloff>:/data/images/data/images/italic.png</iconset>
|
<normaloff>:/data/images/data/images/italic.png</normaloff>:/data/images/data/images/italic.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -762,7 +763,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionUnderline">
|
<action name="actionUnderline">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/underline.png</normaloff>:/data/images/data/images/underline.png</iconset>
|
<normaloff>:/data/images/data/images/underline.png</normaloff>:/data/images/data/images/underline.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -771,7 +772,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionOverline">
|
<action name="actionOverline">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/overline.png</normaloff>:/data/images/data/images/overline.png</iconset>
|
<normaloff>:/data/images/data/images/overline.png</normaloff>:/data/images/data/images/overline.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -780,7 +781,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionSize">
|
<action name="actionSize">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/font-size.png</normaloff>:/data/images/data/images/font-size.png</iconset>
|
<normaloff>:/data/images/data/images/font-size.png</normaloff>:/data/images/data/images/font-size.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -789,7 +790,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionFont">
|
<action name="actionFont">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="data.qrc">
|
<iconset>
|
||||||
<normaloff>:/data/images/data/images/font.png</normaloff>:/data/images/data/images/font.png</iconset>
|
<normaloff>:/data/images/data/images/font.png</normaloff>:/data/images/data/images/font.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -848,9 +849,12 @@
|
|||||||
<string>Ctrl+Q</string>
|
<string>Ctrl+Q</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionWeb">
|
||||||
|
<property name="text">
|
||||||
|
<string>Web</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="data.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
BIN
pages/images/logo.png
Normal file
BIN
pages/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 168 KiB |
Loading…
x
Reference in New Issue
Block a user