diff --git a/src/View/Study/Window.py b/src/View/Study/Window.py
index 42893924..a903caa7 100644
--- a/src/View/Study/Window.py
+++ b/src/View/Study/Window.py
@@ -21,8 +21,13 @@ from View.Tools.PamhyrWindow import PamhyrDialog
from PyQt5.QtCore import QCoreApplication
+from PyQt5.QtGui import (
+ QFont, QColor
+)
+
from PyQt5.QtWidgets import (
QRadioButton, QLabel, QDateTimeEdit,
+ QTextEdit, QPushButton,
)
_translate = QCoreApplication.translate
@@ -52,7 +57,8 @@ class NewStudyWindow(PamhyrDialog):
if self._study is not None:
self.set_line_edit_text("lineEdit_name", self._study.name)
self.set_text_edit_text(
- "textEdit_description", self._study.description)
+ "textEdit_description", self._study.description
+ )
self.set_datetime_edit("dateTimeEdit_date", self._study.date)
self.find(QLabel, "label_creation_date_data").setText(
@@ -76,6 +82,25 @@ class NewStudyWindow(PamhyrDialog):
time.toggled.connect(self.set_time)
date.toggled.connect(self.set_date)
+ self._desc = self.find(QTextEdit, "textEdit_description")
+ self._bold = self.find(QPushButton, "pushButton_bold")
+ self._italic = self.find(QPushButton, "pushButton_italic")
+ self._underline = self.find(QPushButton, "pushButton_underline")
+ self._highlight = self.find(QPushButton, "pushButton_highlight")
+
+ self._bold.clicked.connect(
+ lambda x: self._desc.setFontWeight(
+ QFont.Bold if x else QFont.Normal
+ )
+ )
+ self._italic.clicked.connect(self._desc.setFontItalic)
+ self._underline.clicked.connect(self._desc.setFontUnderline)
+ self._highlight.clicked.connect(
+ lambda x: self._desc.setTextBackgroundColor(
+ QColor("yellow") if x else QColor("white")
+ )
+ )
+
def set_time(self):
if self.get_radio_button("radioButton_time"):
self.find(QLabel, "label_date").setEnabled(False)
diff --git a/src/View/ui/NewStudy.ui b/src/View/ui/NewStudy.ui
index a7892389..680e9e2b 100644
--- a/src/View/ui/NewStudy.ui
+++ b/src/View/ui/NewStudy.ui
@@ -13,90 +13,145 @@
Dialog
-
+
-
-
-
-
-
-
- Name
+
+
+ Name
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+ -
+
+
+ MyNewStudy
+
+
+
+ -
+
+
+ Time system
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
- -
-
-
- MyNewStudy
-
-
-
- -
-
-
- Time system
-
-
-
- -
-
+
-
+
-
-
-
- Time
+
+
+
+ 32
+ 16777215
+
-
+
+
+ 75
+ true
+
+
+
+ B
+
+
true
-
-
-
-
-
-
- Date
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- -
-
-
- false
-
-
- Staring date
-
-
-
- -
-
-
- false
-
-
- dd/MM/yyyy HH:mm:ss
-
-
-
-
+
+
+
+ 32
+ 16777215
+
+
+
+
+ true
+
+
+
+ I
+
+
+ true
+
+
+
+ -
+
+
+
+ 32
+ 16777215
+
+
+
+
+ true
+
+
+
+ U
+
+
+ true
+
+
+
+ -
+
+
+ Highlight
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
- -
-
-
- Description
-
-
-
- -
+
-
false
@@ -108,7 +163,66 @@
- -
+
-
+
+
+ Description
+
+
+
+ -
+
+
-
+
+
+ Time
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+ Date
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ false
+
+
+ Staring date
+
+
+
+ -
+
+
+ false
+
+
+ dd/MM/yyyy HH:mm:ss
+
+
+
+
+
+
+
+ -
-
@@ -140,16 +254,6 @@
- -
-
-
- Qt::Horizontal
-
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
-
-
-