add of web button to index.html
This commit is contained in:
parent
cf486f6e68
commit
d69d10605e
@ -18,6 +18,9 @@
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include "web.h"
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <QFileInfo>
|
||||
|
||||
int MainWindow::indexPath = 0;
|
||||
|
||||
@ -1050,3 +1053,22 @@ void MainWindow::on_addStep_clicked()
|
||||
|
||||
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 extractDialogue();
|
||||
bool m_handlingUndoRedo = false;
|
||||
void openIndexSite();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_clicked();
|
||||
@ -127,6 +128,8 @@ private slots:
|
||||
|
||||
void on_actionExit_triggered();
|
||||
|
||||
void on_actionWeb_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
QString currentFile;
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::NoFrame</enum>
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<item>
|
||||
@ -262,7 +262,7 @@
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/add.png</normaloff>:/data/images/data/images/add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
@ -333,7 +333,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::NoFrame</enum>
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
@ -361,7 +361,7 @@
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/add.png</normaloff>:/data/images/data/images/add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
@ -484,7 +484,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>22</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
@ -495,6 +495,7 @@
|
||||
<addaction name="actionOpen"/>
|
||||
<addaction name="actionSave"/>
|
||||
<addaction name="actionSave_as"/>
|
||||
<addaction name="actionWeb"/>
|
||||
<addaction name="actionExit"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuEdit">
|
||||
@ -579,110 +580,110 @@
|
||||
</action>
|
||||
<action name="actionNewFile">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/new.png</normaloff>:/data/images/data/images/new.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>New File</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSaveFile">
|
||||
<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>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSaveAsFile">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/save.png</normaloff>:/data/images/data/images/save.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save as</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEditCopy">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/copy.png</normaloff>:/data/images/data/images/copy.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Copy</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEditPaste">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/paste.png</normaloff>:/data/images/data/images/paste.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Paste</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEditCut">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/cut.png</normaloff>:/data/images/data/images/cut.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cut</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEditUndo">
|
||||
<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>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Undo</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEditRedo">
|
||||
<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>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Redo</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionopenFile">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/open.png</normaloff>:/data/images/data/images/open.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open file</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNew">
|
||||
@ -735,7 +736,7 @@
|
||||
</action>
|
||||
<action name="actionColor">
|
||||
<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>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -744,7 +745,7 @@
|
||||
</action>
|
||||
<action name="actionBold">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/bold.png</normaloff>:/data/images/data/images/bold.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -753,7 +754,7 @@
|
||||
</action>
|
||||
<action name="actionItalic">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/italic.png</normaloff>:/data/images/data/images/italic.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -762,7 +763,7 @@
|
||||
</action>
|
||||
<action name="actionUnderline">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/underline.png</normaloff>:/data/images/data/images/underline.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -771,7 +772,7 @@
|
||||
</action>
|
||||
<action name="actionOverline">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/overline.png</normaloff>:/data/images/data/images/overline.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -780,7 +781,7 @@
|
||||
</action>
|
||||
<action name="actionSize">
|
||||
<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>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -789,7 +790,7 @@
|
||||
</action>
|
||||
<action name="actionFont">
|
||||
<property name="icon">
|
||||
<iconset resource="data.qrc">
|
||||
<iconset>
|
||||
<normaloff>:/data/images/data/images/font.png</normaloff>:/data/images/data/images/font.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
@ -848,9 +849,12 @@
|
||||
<string>Ctrl+Q</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionWeb">
|
||||
<property name="text">
|
||||
<string>Web</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="data.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</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