-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoteswindow.cpp
31 lines (28 loc) · 854 Bytes
/
noteswindow.cpp
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
#include "noteswindow.h"
#include "ui_noteswindow.h"
#include "mainwindow.h"
NotesWindow::NotesWindow(QWidget *parent) :
ui(new Ui::NotesWindow)
{
parentWindow = parent;
qWarning() <<"Konstruktor NOTATEK";
qWarning() <<MainWindow::notesText;
ui->setupUi(this);
ui->notes->setPlainText(MainWindow::notesText);
}
NotesWindow::~NotesWindow()
{
qWarning() <<"destruktor notatek";
delete ui;
}
void NotesWindow::on_notes_textChanged()
{
MainWindow::notesText = ui->notes->toPlainText();
if(parentWindow->windowTitle().toStdString()[parentWindow->windowTitle().toStdString().size() - 1] != '*')
parentWindow->setWindowTitle(parentWindow->windowTitle() + "*");
}
void NotesWindow::closeEvent(QCloseEvent *event)
{
MainWindow::notesText = ui->notes->toPlainText();
qWarning() << "wychodze z notatek";
}