feature/menuUi #1
+6
-3
@@ -11,14 +11,17 @@ CONFIG += c++17
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
character.cpp \
|
character.cpp \
|
||||||
main.cpp \
|
main.cpp \
|
||||||
mainwindow.cpp
|
mainwindow.cpp \
|
||||||
|
notepad.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
character.h \
|
character.h \
|
||||||
mainwindow.h
|
mainwindow.h \
|
||||||
|
notepad.h \
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
mainwindow.ui
|
mainwindow.ui \
|
||||||
|
notepad.ui \
|
||||||
|
|
||||||
# Default rules for deployment.
|
# Default rules for deployment.
|
||||||
qnx: target.path = /tmp/$${TARGET}/bin
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+3
-6
@@ -26,6 +26,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
|
delete notePad;
|
||||||
delete currentCharacter;
|
delete currentCharacter;
|
||||||
|
|
||||||
for(Character* c : characters) {
|
for(Character* c : characters) {
|
||||||
@@ -230,12 +231,8 @@ void MainWindow::on_actionEditer_triggered(){
|
|||||||
|
|
||||||
|
|
||||||
void MainWindow::on_actionBlocNote_triggered(){
|
void MainWindow::on_actionBlocNote_triggered(){
|
||||||
if(notePad){
|
notePad = new NotePad();
|
||||||
//Menu notepad ouvert
|
this->notePad->show();
|
||||||
}else{
|
|
||||||
//Menu notepad fermé
|
|
||||||
}
|
|
||||||
notePad=!notePad;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -2,6 +2,7 @@
|
|||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include "character.h"
|
#include "character.h"
|
||||||
|
#include "notepad.h"
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
|
|
||||||
@@ -38,9 +39,10 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
|
NotePad *notePad;
|
||||||
|
|
||||||
bool edition = false;
|
bool edition = false;
|
||||||
bool notePad = false;
|
bool backPack = false;
|
||||||
QString currentFile;
|
QString currentFile;
|
||||||
QList<Character*> characters;
|
QList<Character*> characters;
|
||||||
Character* currentCharacter;
|
Character* currentCharacter;
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#include "notepad.h"
|
||||||
|
#include "ui_notepad.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
NotePad::NotePad(QWidget *parent)
|
||||||
|
: QMainWindow(parent)
|
||||||
|
, ui(new Ui::NotePad)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
NotePad::~NotePad(){
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#ifndef NOTEPAD_H
|
||||||
|
#define NOTEPAD_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
namespace Ui {
|
||||||
|
class NotePad;
|
||||||
|
}
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
class NotePad : public QMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
NotePad(QWidget *parent = nullptr);
|
||||||
|
~NotePad();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::NotePad *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // NOTEPAD_H
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>NotePad</class>
|
||||||
|
<widget class="QMainWindow" name="NotePad">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>600</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>MainWindow</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget"/>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Reference in New Issue
Block a user