add of blocNote
This commit is contained in:
parent
c8a253e690
commit
78cd25df39
@ -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
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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
notepad.cpp
Normal file
15
notepad.cpp
Normal file
@ -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(){
|
||||||
|
|
||||||
|
}
|
||||||
24
notepad.h
Normal file
24
notepad.h
Normal file
@ -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
notepad.ui
Normal file
31
notepad.ui
Normal file
@ -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>
|
||||||
Loading…
x
Reference in New Issue
Block a user