diff --git a/docs/Charts/Work Pies/Code.svg b/docs/Charts/Work Pies/Code.svg
new file mode 100644
index 0000000..6b1ef44
--- /dev/null
+++ b/docs/Charts/Work Pies/Code.svg
@@ -0,0 +1,110 @@
+
+
diff --git a/docs/Charts/Work Pies/Dokumentation.svg b/docs/Charts/Work Pies/Dokumentation.svg
new file mode 100644
index 0000000..b868cd5
--- /dev/null
+++ b/docs/Charts/Work Pies/Dokumentation.svg
@@ -0,0 +1,117 @@
+
+
diff --git a/docs/Charts/Work Pies/Kundenkommunikation.svg b/docs/Charts/Work Pies/Kundenkommunikation.svg
new file mode 100644
index 0000000..da56e51
--- /dev/null
+++ b/docs/Charts/Work Pies/Kundenkommunikation.svg
@@ -0,0 +1,97 @@
+
+
diff --git a/docs/Charts/Work Pies/Legende.svg b/docs/Charts/Work Pies/Legende.svg
new file mode 100644
index 0000000..99d4f39
--- /dev/null
+++ b/docs/Charts/Work Pies/Legende.svg
@@ -0,0 +1,163 @@
+
+
+
+
diff --git a/docs/Charts/Work Pies/Teammanagment.svg b/docs/Charts/Work Pies/Teammanagment.svg
new file mode 100644
index 0000000..48fdb92
--- /dev/null
+++ b/docs/Charts/Work Pies/Teammanagment.svg
@@ -0,0 +1,87 @@
+
+
diff --git a/docs/Charts/Work Pies/UI Design.svg b/docs/Charts/Work Pies/UI Design.svg
new file mode 100644
index 0000000..7fd411f
--- /dev/null
+++ b/docs/Charts/Work Pies/UI Design.svg
@@ -0,0 +1,97 @@
+
+
diff --git a/docs/Charts/Work Pies/aufteilungen.txt b/docs/Charts/Work Pies/aufteilungen.txt
new file mode 100644
index 0000000..f254a3c
--- /dev/null
+++ b/docs/Charts/Work Pies/aufteilungen.txt
@@ -0,0 +1,30 @@
+# UI-Design
+Paul 30
+Mucke 15
+Jan 15
+Basti 40
+
+# Code
+Mucke 35
+Basti 25
+Jan 20
+Conrad 10
+Seb 10
+
+# Dokumentation
+Paul 40
+Mucke 10
+Conrad 10
+Basti 10
+Seb 15
+Jan 15
+
+# Teammanagement
+Mucke 30
+Conrad 50
+Jan 20
+
+# Kundenkommunikation
+Jan 50
+Conrad 25
+Mucke 25
diff --git a/docs/Charts/Workload_per_Week.svg b/docs/Charts/Workload_per_Week.svg
new file mode 100644
index 0000000..cca70f2
--- /dev/null
+++ b/docs/Charts/Workload_per_Week.svg
@@ -0,0 +1,512 @@
+
+
+
+
diff --git a/docs/Sequenzdiagramme/Sequenzdiagram-PenTool.uxf b/docs/Sequenzdiagramme/Sequenzdiagram-PenTool.uxf
index 020ddd8..f4c8db6 100644
--- a/docs/Sequenzdiagramme/Sequenzdiagram-PenTool.uxf
+++ b/docs/Sequenzdiagramme/Sequenzdiagram-PenTool.uxf
@@ -1,13 +1,13 @@
- 10
+ 14
UMLGeneric
- 530
- 70
- 100
- 30
+ 378
+ 14
+ 140
+ 42
_:PaintingArea_
@@ -15,10 +15,10 @@
Relation
- 570
- 90
- 30
- 70
+ 434
+ 42
+ 42
+ 98
lt=.
10.0;10.0;10.0;50.0
@@ -26,10 +26,10 @@
UMLActor
- 340
- 60
- 60
- 110
+ 112
+ 0
+ 84
+ 154
@@ -37,10 +37,10 @@
UMLGeneric
- 360
- 140
- 20
- 780
+ 140
+ 112
+ 28
+ 1092
@@ -48,10 +48,10 @@
UMLGeneric
- 570
- 140
- 20
- 780
+ 434
+ 112
+ 28
+ 1092
@@ -59,10 +59,10 @@
Relation
- 370
- 140
- 220
- 40
+ 154
+ 112
+ 308
+ 56
lt=<-
MouseLeftPressed(event)
@@ -71,10 +71,10 @@ MouseLeftPressed(event)
UMLGeneric
- 780
- 140
- 20
- 780
+ 728
+ 112
+ 28
+ 1092
@@ -82,32 +82,10 @@ MouseLeftPressed(event)
UMLGeneric
- 740
- 70
- 100
- 30
-
- _:IntelliTool_
-
-
-
- Relation
-
- 780
- 90
- 30
- 70
-
- lt=.
- 10.0;10.0;10.0;50.0
-
-
- UMLGeneric
-
- 950
- 70
- 100
- 30
+ 672
+ 14
+ 140
+ 42
_:IntelliToolPen_
@@ -115,10 +93,10 @@ MouseLeftPressed(event)
Relation
- 990
- 90
- 30
- 70
+ 728
+ 42
+ 42
+ 98
lt=.
10.0;10.0;10.0;50.0
@@ -126,10 +104,32 @@ MouseLeftPressed(event)
UMLGeneric
- 990
- 140
- 20
- 770
+ 966
+ 14
+ 140
+ 42
+
+ _:IntelliTool_
+
+
+
+ Relation
+
+ 1022
+ 42
+ 42
+ 98
+
+ lt=.
+ 10.0;10.0;10.0;50.0
+
+
+ UMLGeneric
+
+ 1022
+ 112
+ 28
+ 1078
@@ -137,10 +137,10 @@ MouseLeftPressed(event)
Relation
- 370
- 430
- 220
- 40
+ 154
+ 518
+ 308
+ 56
lt=<-
updateInterface()
@@ -149,10 +149,10 @@ updateInterface()
Relation
- 580
- 160
- 220
- 40
+ 448
+ 140
+ 308
+ 56
lt=<-
MouseLeftPressed(event)
@@ -161,10 +161,10 @@ MouseLeftPressed(event)
Relation
- 790
- 180
- 220
- 40
+ 742
+ 168
+ 308
+ 56
lt=<-
MouseLeftPressed(event)
@@ -173,10 +173,10 @@ MouseLeftPressed(event)
Relation
- 370
- 300
- 220
- 40
+ 154
+ 336
+ 308
+ 56
lt=<-
MouseMove(event)
@@ -185,22 +185,22 @@ MouseMove(event)
Relation
- 580
- 320
- 220
- 40
+ 448
+ 364
+ 308
+ 56
lt=<-
-MouseMove(koordinates)
+MouseMove(coordinates)
200.0;20.0;10.0;20.0
UMLFrame
- 290
- 250
- 840
- 240
+ 42
+ 266
+ 1176
+ 336
loop
--
@@ -215,34 +215,34 @@ until MouseLeftReleased(event) or MouseRightPressed(event)
Relation
- 790
- 340
- 220
- 40
+ 742
+ 392
+ 308
+ 56
lt=<-
-MouseMove(koordinates)
+MouseMove(coordinates)
200.0;20.0;10.0;20.0
Relation
- 580
- 400
- 430
- 40
+ 448
+ 476
+ 308
+ 56
lt=<-
-DrwaLineToKoordinates()
- 10.0;20.0;410.0;20.0
+DrwaLineToCoordinates()
+ 10.0;20.0;200.0;20.0
UMLFrame
- 290
- 520
- 840
- 350
+ 42
+ 644
+ 1176
+ 490
alt
--
@@ -262,10 +262,10 @@ DrwaLineToKoordinates()
Relation
- 370
- 550
- 220
- 40
+ 154
+ 686
+ 308
+ 56
lt=<-
MouseLeftReleased(event)
@@ -274,10 +274,10 @@ MouseLeftReleased(event)
Relation
- 580
- 570
- 220
- 40
+ 448
+ 714
+ 308
+ 56
lt=<-
MouseLeftReleased(event)
@@ -286,10 +286,10 @@ MouseLeftReleased(event)
Relation
- 790
- 590
- 220
- 40
+ 742
+ 742
+ 308
+ 56
lt=<-
MouseLeftReleased(event)
@@ -298,22 +298,22 @@ MouseLeftReleased(event)
Relation
- 580
- 630
- 430
- 40
+ 448
+ 798
+ 308
+ 56
lt=<-
MergeSubLayer()
- 10.0;20.0;410.0;20.0
+ 10.0;20.0;200.0;20.0
Relation
- 580
+ 448
210
- 430
- 40
+ 602
+ 56
lt=<-
CreateSubLayer()
@@ -322,10 +322,10 @@ CreateSubLayer()
Relation
- 370
- 720
- 220
- 40
+ 154
+ 924
+ 308
+ 56
lt=<-
MouseRightPressed(event)
@@ -334,10 +334,10 @@ MouseRightPressed(event)
Relation
- 580
- 740
- 220
- 40
+ 448
+ 952
+ 308
+ 56
lt=<-
MouseRightPressed(event)
@@ -346,10 +346,10 @@ MouseRightPressed(event)
Relation
- 790
- 760
- 220
- 40
+ 742
+ 980
+ 308
+ 56
lt=<-
MouseRightPressed(event)
@@ -358,22 +358,22 @@ MouseRightPressed(event)
Relation
- 580
- 790
- 430
- 40
+ 448
+ 1022
+ 308
+ 56
lt=<-
DeleteSubLayer()
- 10.0;20.0;410.0;20.0
+ 10.0;20.0;200.0;20.0
Relation
- 370
- 660
- 220
- 40
+ 154
+ 840
+ 308
+ 56
lt=<-
updateInterface()
@@ -382,13 +382,49 @@ updateInterface()
Relation
- 370
- 820
- 220
- 40
+ 154
+ 1064
+ 308
+ 56
lt=<-
updateInterface()
10.0;20.0;200.0;20.0
+
+ Relation
+
+ 742
+ 448
+ 308
+ 56
+
+ lt=<-
+()
+ 10.0;20.0;200.0;20.0
+
+
+ Relation
+
+ 742
+ 770
+ 308
+ 56
+
+ lt=<-
+()
+ 10.0;20.0;200.0;20.0
+
+
+ Relation
+
+ 742
+ 1008
+ 308
+ 56
+
+ lt=<-
+()
+ 10.0;20.0;200.0;20.0
+
diff --git a/docs/Sequenzdiagramme/Sequenzdiagram-PlainTool.uxf b/docs/Sequenzdiagramme/Sequenzdiagram-PlainTool.uxf
index 9f91896..0e319e4 100644
--- a/docs/Sequenzdiagramme/Sequenzdiagram-PlainTool.uxf
+++ b/docs/Sequenzdiagramme/Sequenzdiagram-PlainTool.uxf
@@ -1,13 +1,13 @@
- 10
+ 14
UMLGeneric
- 630
- 80
- 100
- 30
+ 392
+ 56
+ 140
+ 42
_:PaintingArea_
@@ -15,10 +15,10 @@
Relation
- 670
- 100
- 30
- 70
+ 448
+ 84
+ 42
+ 98
lt=.
10.0;10.0;10.0;50.0
@@ -26,10 +26,10 @@
UMLActor
- 440
- 70
- 60
- 110
+ 126
+ 42
+ 84
+ 154
@@ -37,10 +37,10 @@
UMLGeneric
- 460
- 150
- 20
- 490
+ 154
+ 154
+ 28
+ 686
@@ -48,10 +48,10 @@
UMLGeneric
- 670
- 150
- 20
- 490
+ 448
+ 154
+ 28
+ 686
@@ -59,10 +59,10 @@
Relation
- 470
- 150
- 220
- 40
+ 168
+ 154
+ 308
+ 56
lt=<-
MouseLeftPressed(event)
@@ -71,10 +71,10 @@ MouseLeftPressed(event)
UMLGeneric
- 880
- 150
- 20
- 490
+ 742
+ 154
+ 28
+ 686
@@ -82,32 +82,10 @@ MouseLeftPressed(event)
UMLGeneric
- 840
- 80
- 100
- 30
-
- _:IntelliTool_
-
-
-
- Relation
-
- 880
- 100
- 30
- 70
-
- lt=.
- 10.0;10.0;10.0;50.0
-
-
- UMLGeneric
-
- 1050
- 80
- 100
- 30
+ 686
+ 56
+ 140
+ 42
_:IntelliToolPlain_
@@ -115,10 +93,10 @@ MouseLeftPressed(event)
Relation
- 1090
- 100
- 30
- 70
+ 742
+ 84
+ 42
+ 98
lt=.
10.0;10.0;10.0;50.0
@@ -126,10 +104,32 @@ MouseLeftPressed(event)
UMLGeneric
- 1090
- 150
- 20
- 490
+ 980
+ 56
+ 140
+ 42
+
+ _:IntelliTool_
+
+
+
+ Relation
+
+ 1036
+ 84
+ 42
+ 98
+
+ lt=.
+ 10.0;10.0;10.0;50.0
+
+
+ UMLGeneric
+
+ 1036
+ 154
+ 28
+ 686
@@ -137,10 +137,10 @@ MouseLeftPressed(event)
Relation
- 680
- 170
- 220
- 40
+ 462
+ 182
+ 308
+ 56
lt=<-
MouseLeftPressed(event)
@@ -149,10 +149,10 @@ MouseLeftPressed(event)
Relation
- 890
- 190
- 220
- 40
+ 756
+ 210
+ 308
+ 56
lt=<-
MouseLeftPressed(event)
@@ -161,22 +161,22 @@ MouseLeftPressed(event)
Relation
- 680
- 220
- 430
- 40
+ 462
+ 252
+ 308
+ 56
lt=<-
CreateSubLayer()
- 10.0;20.0;410.0;20.0
+ 10.0;20.0;200.0;20.0
Relation
- 470
- 280
- 220
- 40
+ 168
+ 336
+ 308
+ 56
lt=<-
MouseLeftReleased(event)
@@ -185,10 +185,10 @@ MouseLeftReleased(event)
Relation
- 680
- 300
- 220
- 40
+ 462
+ 364
+ 308
+ 56
lt=<-
MouseLeftReleased(event)
@@ -197,10 +197,10 @@ MouseLeftReleased(event)
Relation
- 890
- 320
- 220
- 40
+ 756
+ 392
+ 308
+ 56
lt=<-
MouseLeftReleased(event)
@@ -209,22 +209,22 @@ MouseLeftReleased(event)
Relation
- 680
- 360
- 430
- 40
+ 462
+ 448
+ 308
+ 56
lt=<-
MergeSubLayer()
- 10.0;20.0;410.0;20.0
+ 10.0;20.0;200.0;20.0
Relation
- 470
- 390
- 220
- 40
+ 168
+ 490
+ 308
+ 56
lt=<-
updateInterface()
@@ -233,10 +233,10 @@ updateInterface()
UMLFrame
- 390
- 250
- 840
- 350
+ 56
+ 294
+ 1176
+ 490
alt
--
@@ -256,10 +256,10 @@ updateInterface()
Relation
- 470
- 450
- 220
- 40
+ 168
+ 574
+ 308
+ 56
lt=<-
MouseRightPressed(event)
@@ -268,10 +268,10 @@ MouseRightPressed(event)
Relation
- 470
- 550
- 220
- 40
+ 168
+ 714
+ 308
+ 56
lt=<-
updateInterface()
@@ -280,22 +280,22 @@ updateInterface()
Relation
- 680
- 520
- 430
- 40
+ 462
+ 672
+ 308
+ 56
lt=<-
DeleteSubLayer()
- 10.0;20.0;410.0;20.0
+ 10.0;20.0;200.0;20.0
Relation
- 680
- 470
- 220
- 40
+ 462
+ 602
+ 308
+ 56
lt=<-
MouseRightPressed(event)
@@ -304,13 +304,49 @@ MouseRightPressed(event)
Relation
- 890
- 490
- 220
- 40
+ 756
+ 630
+ 308
+ 56
lt=<-
MouseRightPressed(event)
200.0;20.0;10.0;20.0
+
+ Relation
+
+ 756
+ 238
+ 308
+ 56
+
+ lt=<-
+CreateSubLayer()
+ 10.0;20.0;200.0;20.0
+
+
+ Relation
+
+ 756
+ 420
+ 308
+ 56
+
+ lt=<-
+()
+ 10.0;20.0;200.0;20.0
+
+
+ Relation
+
+ 756
+ 658
+ 308
+ 56
+
+ lt=<-
+()
+ 10.0;20.0;200.0;20.0
+
diff --git a/docs/html/_intelli_color_picker_8cpp_source.html b/docs/html/_intelli_color_picker_8cpp_source.html
index f7131a1..02695a7 100644
--- a/docs/html/_intelli_color_picker_8cpp_source.html
+++ b/docs/html/_intelli_color_picker_8cpp_source.html
@@ -100,11 +100,11 @@ $(document).ready(function(){initNavTree('_intelli_color_picker_8cpp_source.html
12 std::swap(firstColor, secondColor);
-
+
16 return this->firstColor;
-
+
20 return this->secondColor;
@@ -122,12 +122,12 @@ $(document).ready(function(){initNavTree('_intelli_color_picker_8cpp_source.html
+QColor getFirstColor() const
A function to read the primary selected color.
virtual ~IntelliColorPicker()
IntelliColorPicker destructor clears up his used memory, if there is some.
void setSecondColor(QColor Color)
A function to set the secondary color.
-QColor getSecondColor()
A function to read the secondary selected color.
+QColor getSecondColor() const
A function to read the secondary selected color.
void setFirstColor(QColor Color)
A function to set the primary color.
-QColor getFirstColor()
A function to read the primary selected color.
void swapColors()
A function switching primary and secondary color.
IntelliColorPicker()
IntelliColorPicker constructor, setting 2 preset colors, be careful, theese color may change in produ...
diff --git a/docs/html/_intelli_color_picker_8h_source.html b/docs/html/_intelli_color_picker_8h_source.html
index 7e610a6..b9fbf6a 100644
--- a/docs/html/_intelli_color_picker_8h_source.html
+++ b/docs/html/_intelli_color_picker_8h_source.html
@@ -105,9 +105,9 @@ $(document).ready(function(){initNavTree('_intelli_color_picker_8h_source.html',
-
+
-
+
@@ -124,11 +124,11 @@ $(document).ready(function(){initNavTree('_intelli_color_picker_8h_source.html',
+QColor getFirstColor() const
A function to read the primary selected color.
virtual ~IntelliColorPicker()
IntelliColorPicker destructor clears up his used memory, if there is some.
void setSecondColor(QColor Color)
A function to set the secondary color.
-QColor getSecondColor()
A function to read the secondary selected color.
+QColor getSecondColor() const
A function to read the secondary selected color.
void setFirstColor(QColor Color)
A function to set the primary color.
-QColor getFirstColor()
A function to read the primary selected color.
The IntelliColorPicker manages the selected colors for one whole project.
void swapColors()
A function switching primary and secondary color.
diff --git a/docs/html/_intelli_photo_gui_8cpp.html b/docs/html/_intelli_photo_gui_8cpp.html
index ace1645..db1e96f 100644
--- a/docs/html/_intelli_photo_gui_8cpp.html
+++ b/docs/html/_intelli_photo_gui_8cpp.html
@@ -88,6 +88,8 @@ $(document).ready(function(){initNavTree('_intelli_photo_gui_8cpp.html',''); ini
diff --git a/docs/html/_intelli_photo_gui_8cpp_source.html b/docs/html/_intelli_photo_gui_8cpp_source.html
index 4e3dac4..94da67a 100644
--- a/docs/html/_intelli_photo_gui_8cpp_source.html
+++ b/docs/html/_intelli_photo_gui_8cpp_source.html
@@ -91,869 +91,873 @@ $(document).ready(function(){initNavTree('_intelli_photo_gui_8cpp_source.html','
-
-
-
-
-
-
-
-
-
-
-
-
-
- 19 setDefaultToolValue();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 36 void IntelliPhotoGui::slotOpen(){
-
-
-
-
-
-
-
- 44 QString fileName = QFileDialog::getOpenFileName(
this,
- 45 tr(
"Open File"), QDir::currentPath(),
nullptr,
nullptr, QFileDialog::DontUseNativeDialog);
-
-
-
- 49 if (!fileName.isEmpty()) {
- 50 paintingArea->
open(fileName);
-
-
-
-
-
-
- 57 void IntelliPhotoGui::slotSave(){
-
- 59 QAction*action = qobject_cast<QAction*>(sender());
-
-
- 62 QByteArray fileFormat = action->data().toByteArray();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 22 setDefaultToolValue();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 39 void IntelliPhotoGui::slotOpen(){
+
+
+
+
+
+
+
+ 47 QString fileName = QFileDialog::getOpenFileName(
this,
+ 48 tr(
"Open File"), QDir::currentPath(),
nullptr,
nullptr, QFileDialog::DontUseNativeDialog);
+
+
+
+ 52 if (!fileName.isEmpty()) {
+ 53 paintingArea->
open(fileName);
+
+
+
+
+
+
+ 60 void IntelliPhotoGui::slotSave(){
+
+ 62 QAction*action = qobject_cast<QAction*>(sender());
-
-
-
-
-
- 69 void IntelliPhotoGui::slotCreateNewRasterLayer(){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 88 void IntelliPhotoGui::slotCreateNewShapedLayer(){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 107 void IntelliPhotoGui::slotChangeDim(){
-
-
-
-
-
-
-
-
-
-
-
-
- 120 paintingArea->setLayerDimensions(width,height);
-
-
-
-
-
- 126 void IntelliPhotoGui::slotDeleteLayer(){
+
+ 65 QByteArray fileFormat = action->data().toByteArray();
+
+
+
+
+
+
+ 72 void IntelliPhotoGui::slotCreateNewRasterLayer(){
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 91 void IntelliPhotoGui::slotCreateNewShapedLayer(){
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 110 void IntelliPhotoGui::slotChangeDim(){
+
+
+
+
+
+
+
+
+
+
+
+
+ 123 paintingArea->setLayerDimensions(width,height);
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- 141 void IntelliPhotoGui::slotSetActiveAlpha(){
-
-
-
-
-
-
-
-
-
-
+
+ 129 void IntelliPhotoGui::slotDeleteLayer(){
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 144 void IntelliPhotoGui::slotSetActiveAlpha(){
+
+
+
+
+
+
+
-
-
-
-
-
-
-
- 160 void IntelliPhotoGui::slotSetPolygon(){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 176 void IntelliPhotoGui::slotPositionMoveUp(){
-
-
-
-
- 181 void IntelliPhotoGui::slotPositionMoveDown(){
-
-
-
-
- 186 void IntelliPhotoGui::slotPositionMoveLeft(){
-
-
-
-
- 191 void IntelliPhotoGui::slotPositionMoveRight(){
-
-
-
-
- 196 void IntelliPhotoGui::slotMoveLayerUp(){
-
-
-
-
- 201 void IntelliPhotoGui::slotMoveLayerDown(){
-
-
-
-
- 206 void IntelliPhotoGui::slotSetActiveLayer(){
-
-
-
-
- 211 int layer =
IntelliInputDialog::getInt(
"Layer to set on",
"Layer:", 1, 1,
static_cast<int>(paintingArea->layerBundle.size()), 1, &ok1);
-
-
-
-
-
-
-
- 219 void IntelliPhotoGui::slotUpdateRenderSettingsOn(){
-
-
-
-
- 224 void IntelliPhotoGui::slotUpdateRenderSettingsOff(){
-
-
-
-
- 229 void IntelliPhotoGui::slotSetFirstColor(){
-
-
-
-
- 234 void IntelliPhotoGui::slotSetSecondColor(){
-
-
-
-
- 239 void IntelliPhotoGui::slotSwapColor(){
-
-
-
-
- 244 void IntelliPhotoGui::slotCreatePenTool(){
- 245 PenButton->setChecked(
true);
-
-
-
- 249 void IntelliPhotoGui::slotCreatePlainTool(){
- 250 PlainButton->setChecked(
true);
-
-
-
- 254 void IntelliPhotoGui::slotCreateLineTool(){
- 255 LineButton->setChecked(
true);
-
-
-
- 259 void IntelliPhotoGui::slotCreateRectangleTool(){
- 260 RectangleButton->setChecked(
true);
-
-
-
- 264 void IntelliPhotoGui::slotCreateCircleTool(){
- 265 CircleButton->setChecked(
true);
-
-
-
- 269 void IntelliPhotoGui::slotCreatePolygonTool(){
- 270 PolygonButton->setChecked(
true);
-
-
-
- 274 void IntelliPhotoGui::slotCreateFloodFillTool(){
- 275 FloodFillButton->setChecked(
true);
-
-
-
-
- 280 void IntelliPhotoGui::slotAboutDialog(){
-
- 282 QMessageBox::about(
this, tr(
"About Painting"),
- 283 tr(
"<p><b>IntelliPhoto - </b>A Pretty basic editor.</p> <br>Developed by Team 7."));
-
-
- 286 void IntelliPhotoGui::slotEnterPressed(){
- 287 QString
string = EditLineWidth->text();
- 288 if(
string.toInt() > 50) {
- 289 EditLineWidth->setText(
"50");
-
-
- 292 string = EditLineInnerAlpha->text();
- 293 if(
string.toInt() > 255) {
- 294 EditLineInnerAlpha->setText(
"255");
-
-
-
-
- 299 void IntelliPhotoGui::slotResetTools(){
- 300 CircleButton->setChecked(
false);
- 301 FloodFillButton->setChecked(
false);
- 302 LineButton->setChecked(
false);
- 303 PenButton->setChecked(
false);
- 304 PlainButton->setChecked(
false);
- 305 PolygonButton->setChecked(
false);
- 306 RectangleButton->setChecked(
false);
-
-
- 309 void IntelliPhotoGui::slotSetWidth(){
-
-
-
-
- 314 EditLineWidth->setText(QString(
"%1").arg(temp));
-
-
-
- 318 void IntelliPhotoGui::slotSetInnerAlpha(){
-
-
-
-
- 323 EditLineInnerAlpha->setText(QString(
"%1").arg(temp));
-
-
-
-
- 328 void IntelliPhotoGui::createActions(){
-
-
- 331 foreach (QByteArray format, QImageWriter::supportedImageFormats()) {
- 332 QString text = tr(
"%1...").arg(QString(format).toUpper());
-
-
- 335 QAction*action =
new QAction(text,
this);
+
+
+
+
+
+
+
+
+
+
+ 163 void IntelliPhotoGui::slotSetPolygon(){
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 179 void IntelliPhotoGui::slotPositionMoveUp(){
+
+
+
+
+ 184 void IntelliPhotoGui::slotPositionMoveDown(){
+
+
+
+
+ 189 void IntelliPhotoGui::slotPositionMoveLeft(){
+
+
+
+
+ 194 void IntelliPhotoGui::slotPositionMoveRight(){
+
+
+
+
+ 199 void IntelliPhotoGui::slotMoveLayerUp(){
+
+
+
+
+ 204 void IntelliPhotoGui::slotMoveLayerDown(){
+
+
+
+
+ 209 void IntelliPhotoGui::slotSetActiveLayer(){
+
+
+
+
+ 214 int layer =
IntelliInputDialog::getInt(
"Layer to set on",
"Layer:", 1, 1,
static_cast<int>(paintingArea->layerBundle.size()), 1, &ok1);
+
+
+
+
+
+
+
+ 222 void IntelliPhotoGui::slotUpdateRenderSettingsOn(){
+
+
+
+
+ 227 void IntelliPhotoGui::slotUpdateRenderSettingsOff(){
+
+
+
+
+ 232 void IntelliPhotoGui::slotSetFirstColor(){
+
+
+
+
+ 237 void IntelliPhotoGui::slotSetSecondColor(){
+
+
+
+
+ 242 void IntelliPhotoGui::slotSwapColor(){
+
+
+
+
+ 247 void IntelliPhotoGui::slotCreatePenTool(){
+ 248 PenButton->setChecked(
true);
+
+
+
+ 252 void IntelliPhotoGui::slotCreatePlainTool(){
+ 253 PlainButton->setChecked(
true);
+
+
+
+ 257 void IntelliPhotoGui::slotCreateLineTool(){
+ 258 LineButton->setChecked(
true);
+
+
+
+ 262 void IntelliPhotoGui::slotCreateRectangleTool(){
+ 263 RectangleButton->setChecked(
true);
+
+
+
+ 267 void IntelliPhotoGui::slotCreateCircleTool(){
+ 268 CircleButton->setChecked(
true);
+
+
+
+ 272 void IntelliPhotoGui::slotCreatePolygonTool(){
+ 273 PolygonButton->setChecked(
true);
+
+
+
+ 277 void IntelliPhotoGui::slotCreateFloodFillTool(){
+ 278 FloodFillButton->setChecked(
true);
+
+
+
+
+ 283 void IntelliPhotoGui::slotAboutDialog(){
+
+ 285 QMessageBox::about(
this, tr(
"About Painting"),
+ 286 tr(
"<p><b>IntelliPhoto - </b>A Pretty basic editor.</p> <br>Developed by Team 7."));
+
+
+ 289 void IntelliPhotoGui::slotEnterPressed(){
+ 290 QString
string = EditLineWidth->text();
+ 291 if(
string.toInt() > 50) {
+ 292 EditLineWidth->setText(
"50");
+
+
+ 295 string = EditLineInnerAlpha->text();
+ 296 if(
string.toInt() > 255) {
+ 297 EditLineInnerAlpha->setText(
"255");
+
+
+
+
+ 302 void IntelliPhotoGui::slotResetTools(){
+ 303 CircleButton->setChecked(
false);
+ 304 FloodFillButton->setChecked(
false);
+ 305 LineButton->setChecked(
false);
+ 306 PenButton->setChecked(
false);
+ 307 PlainButton->setChecked(
false);
+ 308 PolygonButton->setChecked(
false);
+ 309 RectangleButton->setChecked(
false);
+
+
+ 312 void IntelliPhotoGui::slotSetWidth(){
+
+
+
+
+ 317 EditLineWidth->setText(QString(
"%1").arg(temp));
+
+
+
+ 321 void IntelliPhotoGui::slotSetInnerAlpha(){
+
+
+
+
+ 326 EditLineInnerAlpha->setText(QString(
"%1").arg(temp));
+
+
+
+
+ 331 void IntelliPhotoGui::createActions(){
+
+
+ 334 foreach (QByteArray format, QImageWriter::supportedImageFormats()) {
+ 335 QString text = tr(
"%1...").arg(QString(format).toUpper());
-
- 338 action->setData(format);
+
+ 338 QAction*action =
new QAction(text,
this);
-
- 341 connect(action, SIGNAL(triggered()),
this, SLOT(slotSave()));
+
+ 341 action->setData(format);
-
- 344 actionSaveAs.append(action);
-
-
-
- 348 QAction*pngSaveAction =
new QAction(
"PNG-8",
this);
- 349 pngSaveAction->setData(
"PNG");
-
- 351 connect(pngSaveAction, SIGNAL(triggered()),
this, SLOT(slotSave()));
-
- 353 actionSaveAs.append(pngSaveAction);
- 354 pngSaveAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
-
-
- 357 actionExit =
new QAction(tr(
"&Exit"),
this);
- 358 actionExit->setShortcuts(QKeySequence::Quit);
- 359 connect(actionExit, SIGNAL(triggered()),
this, SLOT(close()));
-
- 361 actionOpen =
new QAction(tr(
"&Open"),
this);
- 362 actionOpen->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_O));
- 363 connect(actionOpen, SIGNAL(triggered()),
this, SLOT(slotOpen()));
-
-
- 366 actionCreateNewRasterLayer =
new QAction(tr(
"&Raster Image"),
this);
- 367 actionCreateNewRasterLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N));
- 368 connect(actionCreateNewRasterLayer, SIGNAL(triggered()),
this, SLOT(slotCreateNewRasterLayer()));
-
-
-
- 372 actionCreateNewShapedLayer =
new QAction(tr(
"&Shaped Image"),
this);
- 373 actionCreateNewShapedLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N + Qt::ALT));
- 374 connect(actionCreateNewShapedLayer, SIGNAL(triggered()),
this, SLOT(slotCreateNewShapedLayer()));
-
-
- 377 actionDeleteLayer =
new QAction(tr(
"&Delete Layer..."),
this);
- 378 actionDeleteLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_D));
- 379 connect(actionDeleteLayer, SIGNAL(triggered()),
this, SLOT(slotDeleteLayer()));
-
- 381 actionChangeDim =
new QAction(tr(
"&Change Dimension"),
this);
- 382 actionChangeDim->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_X));
- 383 connect(actionChangeDim, SIGNAL(triggered()),
this, SLOT(slotChangeDim()));
- 384 connect(dimCanvas, SIGNAL(clicked()),
this, SLOT(slotChangeDim()));
-
- 386 actionSetActiveLayer =
new QAction(tr(
"&set Active"),
this);
- 387 actionSetActiveLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_A));
- 388 connect(actionSetActiveLayer, SIGNAL(triggered()),
this, SLOT(slotSetActiveLayer()));
-
- 390 actionSetActiveAlpha =
new QAction(tr(
"&set Alpha"),
this);
- 391 actionSetActiveAlpha->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_A));
- 392 connect(actionSetActiveAlpha, SIGNAL(triggered()),
this, SLOT(slotSetActiveAlpha()));
-
- 394 actionSetPolygon =
new QAction(tr(
"&set new Polygondata"),
this);
- 395 actionSetPolygon->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_P));
- 396 connect(actionSetPolygon, SIGNAL(triggered()),
this, SLOT(slotSetPolygon()));
-
- 398 actionMovePositionUp =
new QAction(tr(
"&move Up"),
this);
- 399 actionMovePositionUp->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Up));
- 400 connect(actionMovePositionUp, SIGNAL(triggered()),
this, SLOT(slotPositionMoveUp()));
-
- 402 actionMovePositionDown =
new QAction(tr(
"&move Down"),
this);
- 403 actionMovePositionDown->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Down));
- 404 connect(actionMovePositionDown, SIGNAL(triggered()),
this, SLOT(slotPositionMoveDown()));
-
- 406 actionMovePositionLeft =
new QAction(tr(
"&move Left"),
this);
- 407 actionMovePositionLeft->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Left));
- 408 connect(actionMovePositionLeft, SIGNAL(triggered()),
this, SLOT(slotPositionMoveLeft()));
-
- 410 actionMovePositionRight =
new QAction(tr(
"&move Right"),
this);
- 411 actionMovePositionRight->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Right));
- 412 connect(actionMovePositionRight, SIGNAL(triggered()),
this, SLOT(slotPositionMoveRight()));
-
- 414 actionMoveLayerUp =
new QAction(tr(
"&move Layer Up"),
this);
- 415 actionMoveLayerUp->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Up));
- 416 connect(actionMoveLayerUp, SIGNAL(triggered()),
this, SLOT(slotMoveLayerUp()));
-
- 418 actionMoveLayerDown =
new QAction(tr(
"&move Layer Down"),
this);
- 419 actionMoveLayerDown->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Down));
- 420 connect(actionMoveLayerDown, SIGNAL(triggered()),
this, SLOT(slotMoveLayerDown()));
-
-
- 423 actionUpdateRenderSettingsOn =
new QAction(tr(
"&On"),
this);
- 424 actionUpdateRenderSettingsOn->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + +Qt::Key_A));
- 425 connect(actionUpdateRenderSettingsOn, SIGNAL(triggered()),
this, SLOT(slotUpdateRenderSettingsOn()));
-
- 427 actionUpdateRenderSettingsOff =
new QAction(tr(
"&Off"),
this);
- 428 actionUpdateRenderSettingsOff->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + +Qt::Key_D));
- 429 connect(actionUpdateRenderSettingsOff, SIGNAL(triggered()),
this, SLOT(slotUpdateRenderSettingsOff()));
-
-
- 432 actionColorPickerFirstColor =
new QAction(tr(
"&Main"),
this);
- 433 actionColorPickerFirstColor->setShortcut(QKeySequence(Qt::ALT + Qt::Key_N));
- 434 connect(actionColorPickerFirstColor, SIGNAL(triggered()),
this, SLOT(slotSetFirstColor()));
- 435 connect(FirstColorButton, SIGNAL(clicked()),
this, SLOT(slotSetFirstColor()));
-
- 437 actionColorPickerSecondColor =
new QAction(tr(
"&Secondary"),
this);
- 438 actionColorPickerSecondColor->setShortcut(QKeySequence(Qt::ALT + Qt::Key_M));
- 439 connect(actionColorPickerSecondColor, SIGNAL(triggered()),
this, SLOT(slotSetSecondColor()));
- 440 connect(SecondColorButton, SIGNAL(clicked()),
this, SLOT(slotSetSecondColor()));
-
- 442 actionColorSwap =
new QAction(tr(
"&Switch"),
this);
- 443 actionColorSwap->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_S));
- 444 connect(actionColorSwap, SIGNAL(triggered()),
this, SLOT(slotSwapColor()));
- 445 connect(SwitchColorButton, SIGNAL(clicked()),
this, SLOT(slotSwapColor()));
-
-
- 448 actionCreatePlainTool =
new QAction(tr(
"&Plain"),
this);
- 449 actionCreatePlainTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_P));
- 450 connect(actionCreatePlainTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
- 451 connect(actionCreatePlainTool, SIGNAL(triggered()),
this, SLOT(slotCreatePlainTool()));
-
-
- 454 actionCreatePenTool =
new QAction(tr(
"&Pen"),
this);
- 455 actionCreatePenTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_S));
- 456 connect(actionCreatePenTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
- 457 connect(actionCreatePenTool, SIGNAL(triggered()),
this, SLOT(slotCreatePenTool()));
-
- 459 actionCreateLineTool =
new QAction(tr(
"&Line"),
this);
- 460 actionCreateLineTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_L));
- 461 connect(actionCreateLineTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
- 462 connect(actionCreateLineTool, SIGNAL(triggered()),
this, SLOT(slotCreateLineTool()));
-
- 464 actionCreateCircleTool =
new QAction(tr(
"&Circle"),
this);
- 465 actionCreateCircleTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_C));
- 466 connect(actionCreateCircleTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
- 467 connect(actionCreateCircleTool, SIGNAL(triggered()),
this, SLOT(slotCreateCircleTool()));
-
- 469 actionCreateRectangleTool =
new QAction(tr(
"&Rectangle"),
this);
- 470 actionCreateRectangleTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_R));
- 471 connect(actionCreateRectangleTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
- 472 connect(actionCreateRectangleTool, SIGNAL(triggered()),
this, SLOT(slotCreateRectangleTool()));
-
- 474 actionCreatePolygonTool =
new QAction(tr(
"&Polygon"),
this);
- 475 actionCreatePolygonTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_V));
- 476 connect(actionCreatePolygonTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
- 477 connect(actionCreatePolygonTool, SIGNAL(triggered()),
this, SLOT(slotCreatePolygonTool()));
-
- 479 actionCreateFloodFillTool =
new QAction(tr(
"&FloodFill"),
this);
- 480 actionCreateFloodFillTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_F));
- 481 connect(actionCreateFloodFillTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
- 482 connect(actionCreateFloodFillTool, SIGNAL(triggered()),
this, SLOT(slotCreateFloodFillTool()));
-
-
- 485 actionAboutDialog =
new QAction(tr(
"&About"),
this);
- 486 actionAboutDialog->setShortcut(Qt::Key_F2);
- 487 connect(actionAboutDialog, SIGNAL(triggered()),
this, SLOT(slotAboutDialog()));
-
-
- 490 actionAboutQtDialog =
new QAction(tr(
"About &Qt"),
this);
- 491 actionAboutQtDialog->setShortcut(Qt::Key_F3);
- 492 connect(actionAboutQtDialog, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
-
- 494 connect(EditLineWidth, SIGNAL(returnPressed()),
this, SLOT(slotEnterPressed()));
- 495 connect(EditLineInnerAlpha, SIGNAL(returnPressed()),
this, SLOT(slotEnterPressed()));
+
+ 344 connect(action, SIGNAL(triggered()),
this, SLOT(slotSave()));
+
+
+ 347 actionSaveAs.append(action);
+
+
+
+ 351 QAction*pngSaveAction =
new QAction(
"PNG-8",
this);
+ 352 pngSaveAction->setData(
"PNG");
+
+ 354 connect(pngSaveAction, SIGNAL(triggered()),
this, SLOT(slotSave()));
+
+ 356 actionSaveAs.append(pngSaveAction);
+ 357 pngSaveAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
+
+
+ 360 actionExit =
new QAction(tr(
"&Exit"),
this);
+ 361 actionExit->setShortcuts(QKeySequence::Quit);
+ 362 connect(actionExit, SIGNAL(triggered()),
this, SLOT(close()));
+
+ 364 actionOpen =
new QAction(tr(
"&Open"),
this);
+ 365 actionOpen->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_O));
+ 366 connect(actionOpen, SIGNAL(triggered()),
this, SLOT(slotOpen()));
+
+
+ 369 actionCreateNewRasterLayer =
new QAction(tr(
"&Raster Image"),
this);
+ 370 actionCreateNewRasterLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N));
+ 371 connect(actionCreateNewRasterLayer, SIGNAL(triggered()),
this, SLOT(slotCreateNewRasterLayer()));
+
+
+
+ 375 actionCreateNewShapedLayer =
new QAction(tr(
"&Shaped Image"),
this);
+ 376 actionCreateNewShapedLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N + Qt::ALT));
+ 377 connect(actionCreateNewShapedLayer, SIGNAL(triggered()),
this, SLOT(slotCreateNewShapedLayer()));
+
+
+ 380 actionDeleteLayer =
new QAction(tr(
"&Delete Layer..."),
this);
+ 381 actionDeleteLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_D));
+ 382 connect(actionDeleteLayer, SIGNAL(triggered()),
this, SLOT(slotDeleteLayer()));
+
+ 384 actionChangeDim =
new QAction(tr(
"&Change Dimension"),
this);
+ 385 actionChangeDim->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_X));
+ 386 connect(actionChangeDim, SIGNAL(triggered()),
this, SLOT(slotChangeDim()));
+ 387 connect(dimCanvas, SIGNAL(clicked()),
this, SLOT(slotChangeDim()));
+
+ 389 actionSetActiveLayer =
new QAction(tr(
"&set Active"),
this);
+ 390 actionSetActiveLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_A));
+ 391 connect(actionSetActiveLayer, SIGNAL(triggered()),
this, SLOT(slotSetActiveLayer()));
+
+ 393 actionSetActiveAlpha =
new QAction(tr(
"&set Alpha"),
this);
+ 394 actionSetActiveAlpha->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_A));
+ 395 connect(actionSetActiveAlpha, SIGNAL(triggered()),
this, SLOT(slotSetActiveAlpha()));
+
+ 397 actionSetPolygon =
new QAction(tr(
"&set new Polygondata"),
this);
+ 398 actionSetPolygon->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_P));
+ 399 connect(actionSetPolygon, SIGNAL(triggered()),
this, SLOT(slotSetPolygon()));
+
+ 401 actionMovePositionUp =
new QAction(tr(
"&move Up"),
this);
+ 402 actionMovePositionUp->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Up));
+ 403 connect(actionMovePositionUp, SIGNAL(triggered()),
this, SLOT(slotPositionMoveUp()));
+
+ 405 actionMovePositionDown =
new QAction(tr(
"&move Down"),
this);
+ 406 actionMovePositionDown->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Down));
+ 407 connect(actionMovePositionDown, SIGNAL(triggered()),
this, SLOT(slotPositionMoveDown()));
+
+ 409 actionMovePositionLeft =
new QAction(tr(
"&move Left"),
this);
+ 410 actionMovePositionLeft->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Left));
+ 411 connect(actionMovePositionLeft, SIGNAL(triggered()),
this, SLOT(slotPositionMoveLeft()));
+
+ 413 actionMovePositionRight =
new QAction(tr(
"&move Right"),
this);
+ 414 actionMovePositionRight->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Right));
+ 415 connect(actionMovePositionRight, SIGNAL(triggered()),
this, SLOT(slotPositionMoveRight()));
+
+ 417 actionMoveLayerUp =
new QAction(tr(
"&move Layer Up"),
this);
+ 418 actionMoveLayerUp->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Up));
+ 419 connect(actionMoveLayerUp, SIGNAL(triggered()),
this, SLOT(slotMoveLayerUp()));
+
+ 421 actionMoveLayerDown =
new QAction(tr(
"&move Layer Down"),
this);
+ 422 actionMoveLayerDown->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Down));
+ 423 connect(actionMoveLayerDown, SIGNAL(triggered()),
this, SLOT(slotMoveLayerDown()));
+
+
+ 426 actionUpdateRenderSettingsOn =
new QAction(tr(
"&On"),
this);
+ 427 actionUpdateRenderSettingsOn->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + +Qt::Key_A));
+ 428 connect(actionUpdateRenderSettingsOn, SIGNAL(triggered()),
this, SLOT(slotUpdateRenderSettingsOn()));
+
+ 430 actionUpdateRenderSettingsOff =
new QAction(tr(
"&Off"),
this);
+ 431 actionUpdateRenderSettingsOff->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + +Qt::Key_D));
+ 432 connect(actionUpdateRenderSettingsOff, SIGNAL(triggered()),
this, SLOT(slotUpdateRenderSettingsOff()));
+
+
+ 435 actionColorPickerFirstColor =
new QAction(tr(
"&Main"),
this);
+ 436 actionColorPickerFirstColor->setShortcut(QKeySequence(Qt::ALT + Qt::Key_N));
+ 437 connect(actionColorPickerFirstColor, SIGNAL(triggered()),
this, SLOT(slotSetFirstColor()));
+ 438 connect(FirstColorButton, SIGNAL(clicked()),
this, SLOT(slotSetFirstColor()));
+
+ 440 actionColorPickerSecondColor =
new QAction(tr(
"&Secondary"),
this);
+ 441 actionColorPickerSecondColor->setShortcut(QKeySequence(Qt::ALT + Qt::Key_M));
+ 442 connect(actionColorPickerSecondColor, SIGNAL(triggered()),
this, SLOT(slotSetSecondColor()));
+ 443 connect(SecondColorButton, SIGNAL(clicked()),
this, SLOT(slotSetSecondColor()));
+
+ 445 actionColorSwap =
new QAction(tr(
"&Switch"),
this);
+ 446 actionColorSwap->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_S));
+ 447 connect(actionColorSwap, SIGNAL(triggered()),
this, SLOT(slotSwapColor()));
+ 448 connect(SwitchColorButton, SIGNAL(clicked()),
this, SLOT(slotSwapColor()));
+
+
+ 451 actionCreatePlainTool =
new QAction(tr(
"&Plain"),
this);
+ 452 actionCreatePlainTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_P));
+ 453 connect(actionCreatePlainTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
+ 454 connect(actionCreatePlainTool, SIGNAL(triggered()),
this, SLOT(slotCreatePlainTool()));
+
+
+ 457 actionCreatePenTool =
new QAction(tr(
"&Pen"),
this);
+ 458 actionCreatePenTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_S));
+ 459 connect(actionCreatePenTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
+ 460 connect(actionCreatePenTool, SIGNAL(triggered()),
this, SLOT(slotCreatePenTool()));
+
+ 462 actionCreateLineTool =
new QAction(tr(
"&Line"),
this);
+ 463 actionCreateLineTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_L));
+ 464 connect(actionCreateLineTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
+ 465 connect(actionCreateLineTool, SIGNAL(triggered()),
this, SLOT(slotCreateLineTool()));
+
+ 467 actionCreateCircleTool =
new QAction(tr(
"&Circle"),
this);
+ 468 actionCreateCircleTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_C));
+ 469 connect(actionCreateCircleTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
+ 470 connect(actionCreateCircleTool, SIGNAL(triggered()),
this, SLOT(slotCreateCircleTool()));
+
+ 472 actionCreateRectangleTool =
new QAction(tr(
"&Rectangle"),
this);
+ 473 actionCreateRectangleTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_R));
+ 474 connect(actionCreateRectangleTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
+ 475 connect(actionCreateRectangleTool, SIGNAL(triggered()),
this, SLOT(slotCreateRectangleTool()));
+
+ 477 actionCreatePolygonTool =
new QAction(tr(
"&Polygon"),
this);
+ 478 actionCreatePolygonTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_V));
+ 479 connect(actionCreatePolygonTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
+ 480 connect(actionCreatePolygonTool, SIGNAL(triggered()),
this, SLOT(slotCreatePolygonTool()));
+
+ 482 actionCreateFloodFillTool =
new QAction(tr(
"&FloodFill"),
this);
+ 483 actionCreateFloodFillTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_F));
+ 484 connect(actionCreateFloodFillTool, SIGNAL(triggered()),
this, SLOT(slotResetTools()));
+ 485 connect(actionCreateFloodFillTool, SIGNAL(triggered()),
this, SLOT(slotCreateFloodFillTool()));
+
+
+ 488 actionAboutDialog =
new QAction(tr(
"&About"),
this);
+ 489 actionAboutDialog->setShortcut(Qt::Key_F2);
+ 490 connect(actionAboutDialog, SIGNAL(triggered()),
this, SLOT(slotAboutDialog()));
+
+
+ 493 actionAboutQtDialog =
new QAction(tr(
"About &Qt"),
this);
+ 494 actionAboutQtDialog->setShortcut(Qt::Key_F3);
+ 495 connect(actionAboutQtDialog, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
- 497 connect(CircleButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
- 498 connect(CircleButton, SIGNAL(clicked()),
this, SLOT(slotCreateCircleTool()));
+ 497 connect(EditLineWidth, SIGNAL(returnPressed()),
this, SLOT(slotEnterPressed()));
+ 498 connect(EditLineInnerAlpha, SIGNAL(returnPressed()),
this, SLOT(slotEnterPressed()));
- 500 connect(FloodFillButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
- 501 connect(FloodFillButton, SIGNAL(clicked()),
this, SLOT(slotCreateFloodFillTool()));
+ 500 connect(CircleButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
+ 501 connect(CircleButton, SIGNAL(clicked()),
this, SLOT(slotCreateCircleTool()));
- 503 connect(LineButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
- 504 connect(LineButton, SIGNAL(clicked()),
this, SLOT(slotCreateLineTool()));
+ 503 connect(FloodFillButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
+ 504 connect(FloodFillButton, SIGNAL(clicked()),
this, SLOT(slotCreateFloodFillTool()));
- 506 connect(PenButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
- 507 connect(PenButton, SIGNAL(clicked()),
this, SLOT(slotCreatePenTool()));
+ 506 connect(LineButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
+ 507 connect(LineButton, SIGNAL(clicked()),
this, SLOT(slotCreateLineTool()));
- 509 connect(PlainButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
- 510 connect(PlainButton, SIGNAL(clicked()),
this, SLOT(slotCreatePlainTool()));
+ 509 connect(PenButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
+ 510 connect(PenButton, SIGNAL(clicked()),
this, SLOT(slotCreatePenTool()));
- 512 connect(PolygonButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
- 513 connect(PolygonButton, SIGNAL(clicked()),
this, SLOT(slotCreatePolygonTool()));
+ 512 connect(PlainButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
+ 513 connect(PlainButton, SIGNAL(clicked()),
this, SLOT(slotCreatePlainTool()));
- 515 connect(RectangleButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
- 516 connect(RectangleButton, SIGNAL(clicked()),
this, SLOT(slotCreateRectangleTool()));
+ 515 connect(PolygonButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
+ 516 connect(PolygonButton, SIGNAL(clicked()),
this, SLOT(slotCreatePolygonTool()));
- 518 actionSetWidth =
new QAction(tr(
"&Set Width"),
this);
- 519 actionSetWidth->setShortcut(QKeySequence(Qt::ALT + Qt::Key_W));
- 520 connect(actionSetWidth, SIGNAL(triggered()),
this, SLOT(slotSetWidth()));
-
- 522 actionSetInnerAlpha =
new QAction(tr(
"&Set Inner Alpha"),
this);
- 523 actionSetInnerAlpha->setShortcut(QKeySequence(Qt::ALT + Qt::Key_A));
- 524 connect(actionSetInnerAlpha, SIGNAL(triggered()),
this, SLOT(slotSetInnerAlpha()));
-
-
-
- 528 void IntelliPhotoGui::createMenus(){
-
- 530 saveAsMenu =
new QMenu(tr(
"&Save As"),
this);
- 531 foreach (QAction * action, actionSaveAs)
- 532 saveAsMenu->addAction(action);
-
-
- 535 fileMenu =
new QMenu(tr(
"&File"),
this);
- 536 fileMenu->addAction(actionOpen);
- 537 fileMenu->addMenu(saveAsMenu);
- 538 fileMenu->addSeparator();
- 539 fileMenu->addAction(actionExit);
-
-
- 542 renderMenu =
new QMenu(tr(
"&Fast Renderer"),
this);
- 543 renderMenu->addAction(actionUpdateRenderSettingsOn);
- 544 renderMenu->addAction(actionUpdateRenderSettingsOff);
-
-
- 547 layerCreationMenu =
new QMenu(tr(
"&Create new Layer"),
this);
- 548 layerCreationMenu->addAction(actionCreateNewRasterLayer);
- 549 layerCreationMenu->addAction(actionCreateNewShapedLayer);
-
- 551 layerMenu =
new QMenu(tr(
"&Layer"),
this);
- 552 layerMenu->addMenu(layerCreationMenu);
- 553 layerMenu->addSeparator();
- 554 layerMenu->addAction(actionSetActiveAlpha);
- 555 layerMenu->addAction(actionSetActiveLayer);
- 556 layerMenu->addAction(actionSetPolygon);
- 557 layerMenu->addSeparator();
- 558 layerMenu->addAction(actionMovePositionUp);
- 559 layerMenu->addAction(actionMovePositionDown);
- 560 layerMenu->addAction(actionMovePositionLeft);
- 561 layerMenu->addAction(actionMovePositionRight);
- 562 layerMenu->addAction(actionMoveLayerUp);
- 563 layerMenu->addAction(actionMoveLayerDown);
- 564 layerMenu->addSeparator();
- 565 layerMenu->addAction(actionDeleteLayer);
-
-
- 568 colorMenu =
new QMenu(tr(
"&Color"),
this);
- 569 colorMenu->addAction(actionColorPickerFirstColor);
- 570 colorMenu->addAction(actionColorPickerSecondColor);
- 571 colorMenu->addAction(actionColorSwap);
-
-
- 574 toolCreationMenu =
new QMenu(tr(
"&Drawingtools"),
this);
- 575 toolCreationMenu->addAction(actionCreateCircleTool);
- 576 toolCreationMenu->addAction(actionCreateFloodFillTool);
- 577 toolCreationMenu->addAction(actionCreateLineTool);
- 578 toolCreationMenu->addAction(actionCreatePenTool);
- 579 toolCreationMenu->addAction(actionCreatePlainTool);
- 580 toolCreationMenu->addAction(actionCreatePolygonTool);
- 581 toolCreationMenu->addAction(actionCreateRectangleTool);
-
-
- 584 toolSettingsMenu =
new QMenu(tr(
"&Toolsettings"),
this);
- 585 toolSettingsMenu->addAction(actionSetWidth);
- 586 toolSettingsMenu->addAction(actionSetInnerAlpha);
-
-
- 589 toolMenu =
new QMenu(tr(
"&Tools"),
this);
- 590 toolMenu->addMenu(toolCreationMenu);
- 591 toolMenu->addMenu(toolSettingsMenu);
- 592 toolMenu->addSeparator();
- 593 toolMenu->addMenu(colorMenu);
-
-
- 596 optionMenu =
new QMenu(tr(
"&Options"),
this);
- 597 optionMenu->addMenu(layerMenu);
- 598 optionMenu->addMenu(toolMenu);
- 599 optionMenu->addSeparator();
- 600 optionMenu->addMenu(renderMenu);
- 601 optionMenu->addAction(actionChangeDim);
-
-
- 604 helpMenu =
new QMenu(tr(
"&Help"),
this);
- 605 helpMenu->addAction(actionAboutDialog);
- 606 helpMenu->addAction(actionAboutQtDialog);
-
-
- 609 menuBar()->addMenu(fileMenu);
- 610 menuBar()->addMenu(optionMenu);
- 611 menuBar()->addMenu(helpMenu);
-
-
- 614 void IntelliPhotoGui::createGui(){
-
- 616 centralGuiWidget =
new QWidget(
this);
- 617 setCentralWidget(centralGuiWidget);
-
-
- 620 mainLayout =
new QGridLayout(centralGuiWidget);
- 621 centralGuiWidget->setLayout(mainLayout);
-
-
-
-
- 626 paintingArea->DummyGui =
this;
-
- 628 preview = QPixmap(
":/Icons/Buttons/icons/circle-tool.svg");
- 629 CircleButton =
new QPushButton();
- 630 CircleButton->setFixedSize(Buttonsize);
- 631 CircleButton->setIcon(preview);
- 632 CircleButton->setIconSize(Buttonsize);
- 633 CircleButton->setCheckable(
true);
-
- 635 preview = QPixmap(
":/Icons/Buttons/icons/flood-fill-tool.svg");
- 636 FloodFillButton =
new QPushButton();
- 637 FloodFillButton->setFixedSize(Buttonsize);
- 638 FloodFillButton->setIcon(preview);
- 639 FloodFillButton->setIconSize(Buttonsize);
- 640 FloodFillButton->setCheckable(
true);
-
- 642 preview = QPixmap(
":/Icons/Buttons/icons/line-tool.svg");
- 643 LineButton =
new QPushButton();
- 644 LineButton->setFixedSize(Buttonsize);
- 645 LineButton->setIcon(preview);
- 646 LineButton->setIconSize(Buttonsize);
- 647 LineButton->setCheckable(
true);
-
- 649 preview = QPixmap(
":/Icons/Buttons/icons/pen-tool.svg");
- 650 PenButton =
new QPushButton();
- 651 PenButton->setFixedSize(Buttonsize);
- 652 PenButton->setIcon(preview);
- 653 PenButton->setIconSize(Buttonsize);
- 654 PenButton->setCheckable(
true);
-
- 656 preview = QPixmap(
":/Icons/Buttons/icons/plain-tool.svg");
- 657 PlainButton =
new QPushButton();
- 658 PlainButton->setFixedSize(Buttonsize);
- 659 PlainButton->setIcon(preview);
- 660 PlainButton->setIconSize(Buttonsize);
- 661 PlainButton->setCheckable(
true);
-
- 663 preview = QPixmap(
":/Icons/Buttons/icons/polygon-tool.svg");
- 664 PolygonButton =
new QPushButton();
- 665 PolygonButton->setFixedSize(Buttonsize);
- 666 PolygonButton->setIcon(preview);
- 667 PolygonButton->setIconSize(Buttonsize);
- 668 PolygonButton->setCheckable(
true);
-
- 670 preview = QPixmap(
":/Icons/Buttons/icons/rectangle-tool.svg");
- 671 RectangleButton =
new QPushButton();
- 672 RectangleButton->setFixedSize(Buttonsize);
- 673 RectangleButton->setIcon(preview);
- 674 RectangleButton->setIconSize(Buttonsize);
- 675 RectangleButton->setCheckable(
true);
-
- 677 WidthLine =
new QLabel();
- 678 WidthLine->setText(
"Width");
- 679 WidthLine->setFixedSize(Buttonsize.width() * 2,(Buttonsize.height() * 2) / 3);
-
- 681 EditLineWidth =
new QLineEdit();
- 682 EditLineWidth->setFixedSize(Buttonsize.width() * 2,(Buttonsize.height() * 2) / 3);
- 683 EditLineWidth->setText(
"5");
- 684 ValidatorLineWidth =
new QIntValidator();
- 685 ValidatorLineWidth->setTop(99);
- 686 ValidatorLineWidth->setBottom(1);
- 687 EditLineWidth->setValidator(ValidatorLineWidth);
-
- 689 innerAlphaLine =
new QLabel();
- 690 innerAlphaLine->setText(
"Inner Alpha");
- 691 innerAlphaLine->setFixedSize(Buttonsize.width() * 2,(Buttonsize.height() * 2) / 3);
-
- 693 EditLineInnerAlpha =
new QLineEdit();
- 694 EditLineInnerAlpha->setFixedSize(Buttonsize.width() * 2,(Buttonsize.height() * 2) / 3);
- 695 EditLineInnerAlpha->setText(
"255");
- 696 ValidatorInnerAlpha =
new QIntValidator();
- 697 ValidatorInnerAlpha->setTop(999);
- 698 ValidatorInnerAlpha->setBottom(0);
- 699 EditLineInnerAlpha->setValidator(ValidatorInnerAlpha);
-
- 701 FirstColorButton =
new QPushButton();
- 702 FirstColorButton->setFixedSize(Buttonsize);
+ 518 connect(RectangleButton,SIGNAL(pressed()),
this, SLOT(slotResetTools()));
+ 519 connect(RectangleButton, SIGNAL(clicked()),
this, SLOT(slotCreateRectangleTool()));
+
+ 521 actionSetWidth =
new QAction(tr(
"&Set Width"),
this);
+ 522 actionSetWidth->setShortcut(QKeySequence(Qt::ALT + Qt::Key_W));
+ 523 connect(actionSetWidth, SIGNAL(triggered()),
this, SLOT(slotSetWidth()));
+
+ 525 actionSetInnerAlpha =
new QAction(tr(
"&Set Inner Alpha"),
this);
+ 526 actionSetInnerAlpha->setShortcut(QKeySequence(Qt::ALT + Qt::Key_A));
+ 527 connect(actionSetInnerAlpha, SIGNAL(triggered()),
this, SLOT(slotSetInnerAlpha()));
+
+
+
+ 531 void IntelliPhotoGui::createMenus(){
+
+ 533 saveAsMenu =
new QMenu(tr(
"&Save As"),
this);
+ 534 foreach (QAction * action, actionSaveAs)
+ 535 saveAsMenu->addAction(action);
+
+
+ 538 fileMenu =
new QMenu(tr(
"&File"),
this);
+ 539 fileMenu->addAction(actionOpen);
+ 540 fileMenu->addMenu(saveAsMenu);
+ 541 fileMenu->addSeparator();
+ 542 fileMenu->addAction(actionExit);
+
+
+ 545 renderMenu =
new QMenu(tr(
"&Fast Renderer"),
this);
+ 546 renderMenu->addAction(actionUpdateRenderSettingsOn);
+ 547 renderMenu->addAction(actionUpdateRenderSettingsOff);
+
+
+ 550 layerCreationMenu =
new QMenu(tr(
"&Create new Layer"),
this);
+ 551 layerCreationMenu->addAction(actionCreateNewRasterLayer);
+ 552 layerCreationMenu->addAction(actionCreateNewShapedLayer);
+
+ 554 layerMenu =
new QMenu(tr(
"&Layer"),
this);
+ 555 layerMenu->addMenu(layerCreationMenu);
+ 556 layerMenu->addSeparator();
+ 557 layerMenu->addAction(actionSetActiveAlpha);
+ 558 layerMenu->addAction(actionSetActiveLayer);
+ 559 layerMenu->addAction(actionSetPolygon);
+ 560 layerMenu->addSeparator();
+ 561 layerMenu->addAction(actionMovePositionUp);
+ 562 layerMenu->addAction(actionMovePositionDown);
+ 563 layerMenu->addAction(actionMovePositionLeft);
+ 564 layerMenu->addAction(actionMovePositionRight);
+ 565 layerMenu->addAction(actionMoveLayerUp);
+ 566 layerMenu->addAction(actionMoveLayerDown);
+ 567 layerMenu->addSeparator();
+ 568 layerMenu->addAction(actionDeleteLayer);
+
+
+ 571 colorMenu =
new QMenu(tr(
"&Color"),
this);
+ 572 colorMenu->addAction(actionColorPickerFirstColor);
+ 573 colorMenu->addAction(actionColorPickerSecondColor);
+ 574 colorMenu->addAction(actionColorSwap);
+
+
+ 577 toolCreationMenu =
new QMenu(tr(
"&Drawingtools"),
this);
+ 578 toolCreationMenu->addAction(actionCreateCircleTool);
+ 579 toolCreationMenu->addAction(actionCreateFloodFillTool);
+ 580 toolCreationMenu->addAction(actionCreateLineTool);
+ 581 toolCreationMenu->addAction(actionCreatePenTool);
+ 582 toolCreationMenu->addAction(actionCreatePlainTool);
+ 583 toolCreationMenu->addAction(actionCreatePolygonTool);
+ 584 toolCreationMenu->addAction(actionCreateRectangleTool);
+
+
+ 587 toolSettingsMenu =
new QMenu(tr(
"&Toolsettings"),
this);
+ 588 toolSettingsMenu->addAction(actionSetWidth);
+ 589 toolSettingsMenu->addAction(actionSetInnerAlpha);
+
+
+ 592 toolMenu =
new QMenu(tr(
"&Tools"),
this);
+ 593 toolMenu->addMenu(toolCreationMenu);
+ 594 toolMenu->addMenu(toolSettingsMenu);
+ 595 toolMenu->addSeparator();
+ 596 toolMenu->addMenu(colorMenu);
+
+
+ 599 optionMenu =
new QMenu(tr(
"&Options"),
this);
+ 600 optionMenu->addMenu(layerMenu);
+ 601 optionMenu->addMenu(toolMenu);
+ 602 optionMenu->addSeparator();
+ 603 optionMenu->addMenu(renderMenu);
+ 604 optionMenu->addAction(actionChangeDim);
+
+
+ 607 helpMenu =
new QMenu(tr(
"&Help"),
this);
+ 608 helpMenu->addAction(actionAboutDialog);
+ 609 helpMenu->addAction(actionAboutQtDialog);
+
+
+ 612 menuBar()->addMenu(fileMenu);
+ 613 menuBar()->addMenu(optionMenu);
+ 614 menuBar()->addMenu(helpMenu);
+
+
+ 617 void IntelliPhotoGui::createGui(){
+
+ 619 centralGuiWidget =
new QWidget(
this);
+ 620 setCentralWidget(centralGuiWidget);
+
+
+ 623 mainLayout =
new QGridLayout(centralGuiWidget);
+ 624 centralGuiWidget->setLayout(mainLayout);
+
+
+
+
+ 629 paintingArea->DummyGui =
this;
+
+ 631 preview = QPixmap(
":/Icons/Buttons/icons/circle-tool.svg");
+ 632 CircleButton =
new QPushButton();
+ 633 CircleButton->setFixedSize(Buttonsize);
+ 634 CircleButton->setIcon(preview);
+ 635 CircleButton->setIconSize(Buttonsize);
+ 636 CircleButton->setCheckable(
true);
+
+ 638 preview = QPixmap(
":/Icons/Buttons/icons/flood-fill-tool.svg");
+ 639 FloodFillButton =
new QPushButton();
+ 640 FloodFillButton->setFixedSize(Buttonsize);
+ 641 FloodFillButton->setIcon(preview);
+ 642 FloodFillButton->setIconSize(Buttonsize);
+ 643 FloodFillButton->setCheckable(
true);
+
+ 645 preview = QPixmap(
":/Icons/Buttons/icons/line-tool.svg");
+ 646 LineButton =
new QPushButton();
+ 647 LineButton->setFixedSize(Buttonsize);
+ 648 LineButton->setIcon(preview);
+ 649 LineButton->setIconSize(Buttonsize);
+ 650 LineButton->setCheckable(
true);
+
+ 652 preview = QPixmap(
":/Icons/Buttons/icons/pen-tool.svg");
+ 653 PenButton =
new QPushButton();
+ 654 PenButton->setFixedSize(Buttonsize);
+ 655 PenButton->setIcon(preview);
+ 656 PenButton->setIconSize(Buttonsize);
+ 657 PenButton->setCheckable(
true);
+
+ 659 preview = QPixmap(
":/Icons/Buttons/icons/plain-tool.svg");
+ 660 PlainButton =
new QPushButton();
+ 661 PlainButton->setFixedSize(Buttonsize);
+ 662 PlainButton->setIcon(preview);
+ 663 PlainButton->setIconSize(Buttonsize);
+ 664 PlainButton->setCheckable(
true);
+
+ 666 preview = QPixmap(
":/Icons/Buttons/icons/polygon-tool.svg");
+ 667 PolygonButton =
new QPushButton();
+ 668 PolygonButton->setFixedSize(Buttonsize);
+ 669 PolygonButton->setIcon(preview);
+ 670 PolygonButton->setIconSize(Buttonsize);
+ 671 PolygonButton->setCheckable(
true);
+
+ 673 preview = QPixmap(
":/Icons/Buttons/icons/rectangle-tool.svg");
+ 674 RectangleButton =
new QPushButton();
+ 675 RectangleButton->setFixedSize(Buttonsize);
+ 676 RectangleButton->setIcon(preview);
+ 677 RectangleButton->setIconSize(Buttonsize);
+ 678 RectangleButton->setCheckable(
true);
+
+ 680 WidthLine =
new QLabel();
+ 681 WidthLine->setText(
"Width");
+ 682 WidthLine->setFixedSize(Buttonsize.width() * 2,(Buttonsize.height() * 2) / 3);
+
+ 684 EditLineWidth =
new QLineEdit();
+ 685 EditLineWidth->setFixedSize(Buttonsize.width() * 2,(Buttonsize.height() * 2) / 3);
+ 686 EditLineWidth->setText(
"5");
+ 687 ValidatorLineWidth =
new QIntValidator();
+ 688 ValidatorLineWidth->setTop(99);
+ 689 ValidatorLineWidth->setBottom(1);
+ 690 EditLineWidth->setValidator(ValidatorLineWidth);
+
+ 692 innerAlphaLine =
new QLabel();
+ 693 innerAlphaLine->setText(
"Inner Alpha");
+ 694 innerAlphaLine->setFixedSize(Buttonsize.width() * 2,(Buttonsize.height() * 2) / 3);
+
+ 696 EditLineInnerAlpha =
new QLineEdit();
+ 697 EditLineInnerAlpha->setFixedSize(Buttonsize.width() * 2,(Buttonsize.height() * 2) / 3);
+ 698 EditLineInnerAlpha->setText(
"255");
+ 699 ValidatorInnerAlpha =
new QIntValidator();
+ 700 ValidatorInnerAlpha->setTop(999);
+ 701 ValidatorInnerAlpha->setBottom(0);
+ 702 EditLineInnerAlpha->setValidator(ValidatorInnerAlpha);
- 704 SecondColorButton =
new QPushButton();
- 705 SecondColorButton->setFixedSize(Buttonsize);
+ 704 FirstColorButton =
new QPushButton();
+ 705 FirstColorButton->setFixedSize(Buttonsize);
- 707 preview = QPixmap(
":/Icons/Buttons/icons/Wechselpfeile.png");
- 708 SwitchColorButton =
new QPushButton();
- 709 SwitchColorButton->setFixedSize(Buttonsize.width() * 2,Buttonsize.height());
- 710 SwitchColorButton->setIcon(preview);
- 711 SwitchColorButton->setIconSize(QSize(Buttonsize.width() * 2,Buttonsize.height()));
-
- 713 ActiveLayerLine =
new QLabel();
-
- 715 ActiveLayerLine->setText(
string);
- 716 ActiveLayerLine->setFixedSize(Buttonsize.width() * 2 + 10,(Buttonsize.height() * 2) / 3);
-
-
-
- 720 preview = preview.fromImage(activePicture->
getImageData());
-
- 722 QImage tmp(1,1,QImage::Format_ARGB32);
- 723 tmp.fill(Qt::transparent);
- 724 preview = preview.fromImage(tmp);
-
-
- 727 ActiveLayerImageLabel =
new QLabel();
- 728 ActiveLayerImageLabel->setFixedSize(Buttonsize * 2);
- 729 ActiveLayerImageLabel->setPixmap(preview.scaled(Buttonsize * 2));
-
- 731 dimActive =
new QPushButton();
- 732 dimActive->setFixedSize(Buttonsize.width() * 2,Buttonsize.height() / 2);
- 733 dimActive->setText(
"0x0");
-
- 735 dimCanvas =
new QPushButton();
- 736 dimCanvas->setFixedSize(Buttonsize.width() * 2,Buttonsize.height() / 2);
- 737 QString String = QString(
"%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height());
- 738 dimCanvas->setText(String);
-
-
- 741 mainLayout->addWidget(paintingArea,1,1,20,1);
- 742 mainLayout->addWidget(CircleButton,1,2,1,1);
- 743 mainLayout->addWidget(FloodFillButton,1,3,1,1);
- 744 mainLayout->addWidget(LineButton,2,2,1,1);
- 745 mainLayout->addWidget(PenButton,2,3,1,1);
- 746 mainLayout->addWidget(PlainButton,3,2,1,1);
- 747 mainLayout->addWidget(PolygonButton,3,3,1,1);
- 748 mainLayout->addWidget(RectangleButton,4,2,1,1);
- 749 mainLayout->addWidget(WidthLine,5,2,1,2);
- 750 mainLayout->addWidget(EditLineWidth,6,2,1,2);
- 751 mainLayout->addWidget(innerAlphaLine,7,2,1,2);
- 752 mainLayout->addWidget(EditLineInnerAlpha,8,2,1,2);
- 753 mainLayout->addWidget(FirstColorButton,9,2,1,1);
- 754 mainLayout->addWidget(SecondColorButton,9,3,1,1);
- 755 mainLayout->addWidget(SwitchColorButton,10,2,1,2);
- 756 mainLayout->addWidget(ActiveLayerLine,11,2,1,2);
- 757 mainLayout->addWidget(ActiveLayerImageLabel,12,2,1,2);
- 758 mainLayout->addWidget(dimActive,13,2,1,2);
- 759 mainLayout->addWidget(dimCanvas,14,2,1,2);
- 760 mainLayout->setHorizontalSpacing(0);
-
-
- 763 void IntelliPhotoGui::setIntelliStyle(){
-
- 765 setWindowTitle(
"IntelliPhoto Prototype");
-
- 767 this->setStyleSheet(
"color: white;" "background-color: rgb(64, 64, 64);" "selection-color: rgb(200, 10, 10);" "selection-background-color: rgb(64, 64, 64);");
-
-
- 770 FirstColorButton->setStyleSheet(
string);
-
- 772 SecondColorButton->setStyleSheet(
string);
-
-
- 775 bool IntelliPhotoGui::maybeSave(){
-
+ 707 SecondColorButton =
new QPushButton();
+ 708 SecondColorButton->setFixedSize(Buttonsize);
+
+ 710 preview = QPixmap(
":/Icons/Buttons/icons/Wechselpfeile.png");
+ 711 SwitchColorButton =
new QPushButton();
+ 712 SwitchColorButton->setFixedSize(Buttonsize.width() * 2,Buttonsize.height());
+ 713 SwitchColorButton->setIcon(preview);
+ 714 SwitchColorButton->setIconSize(QSize(Buttonsize.width() * 2,Buttonsize.height()));
+
+ 716 ActiveLayerLine =
new QLabel();
+
+ 718 ActiveLayerLine->setText(
string);
+ 719 ActiveLayerLine->setFixedSize(Buttonsize.width() * 2 + 10,(Buttonsize.height() * 2) / 3);
+
+
+
+ 723 preview = preview.fromImage(activePicture->
getImageData());
+
+ 725 QImage tmp(1,1,QImage::Format_ARGB32);
+ 726 tmp.fill(Qt::transparent);
+ 727 preview = preview.fromImage(tmp);
+
+
+ 730 ActiveLayerImageLabel =
new QLabel();
+ 731 ActiveLayerImageLabel->setFixedSize(Buttonsize * 2);
+ 732 ActiveLayerImageLabel->setPixmap(preview.scaled(Buttonsize * 2));
+
+ 734 dimActive =
new QPushButton();
+ 735 dimActive->setFixedSize(Buttonsize.width() * 2,Buttonsize.height() / 2);
+ 736 dimActive->setText(
"0x0");
+
+ 738 dimCanvas =
new QPushButton();
+ 739 dimCanvas->setFixedSize(Buttonsize.width() * 2,Buttonsize.height() / 2);
+ 740 QString String = QString(
"%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height());
+ 741 dimCanvas->setText(String);
+
+
+ 744 mainLayout->addWidget(paintingArea,1,1,20,1);
+ 745 mainLayout->addWidget(CircleButton,1,2,1,1);
+ 746 mainLayout->addWidget(FloodFillButton,1,3,1,1);
+ 747 mainLayout->addWidget(LineButton,2,2,1,1);
+ 748 mainLayout->addWidget(PenButton,2,3,1,1);
+ 749 mainLayout->addWidget(PlainButton,3,2,1,1);
+ 750 mainLayout->addWidget(PolygonButton,3,3,1,1);
+ 751 mainLayout->addWidget(RectangleButton,4,2,1,1);
+ 752 mainLayout->addWidget(WidthLine,5,2,1,2);
+ 753 mainLayout->addWidget(EditLineWidth,6,2,1,2);
+ 754 mainLayout->addWidget(innerAlphaLine,7,2,1,2);
+ 755 mainLayout->addWidget(EditLineInnerAlpha,8,2,1,2);
+ 756 mainLayout->addWidget(FirstColorButton,9,2,1,1);
+ 757 mainLayout->addWidget(SecondColorButton,9,3,1,1);
+ 758 mainLayout->addWidget(SwitchColorButton,10,2,1,2);
+ 759 mainLayout->addWidget(ActiveLayerLine,11,2,1,2);
+ 760 mainLayout->addWidget(ActiveLayerImageLabel,12,2,1,2);
+ 761 mainLayout->addWidget(dimActive,13,2,1,2);
+ 762 mainLayout->addWidget(dimCanvas,14,2,1,2);
+ 763 mainLayout->setHorizontalSpacing(0);
+
+
+ 766 void IntelliPhotoGui::setIntelliStyle(){
+
+ 768 setWindowTitle(
"IntelliPhoto Prototype");
+
+ 770 this->setStyleSheet(
"color: white;" "background-color: rgb(64, 64, 64);" "selection-color: rgb(200, 10, 10);" "selection-background-color: rgb(64, 64, 64);");
+
+
+ 773 FirstColorButton->setStyleSheet(
string);
+
+ 775 SecondColorButton->setStyleSheet(
string);
+
-
-
- 780 QMessageBox::StandardButton ret;
-
-
-
- 784 ret = QMessageBox::warning(
this, tr(
"Painting"),
- 785 tr(
"The image has been modified.\n"
- 786 "Do you want to save your changes?"),
- 787 QMessageBox::Save | QMessageBox::Discard
- 788 | QMessageBox::Cancel);
-
-
- 791 if (ret == QMessageBox::Save) {
- 792 return saveFile(
"png");
-
-
- 795 }
else if (ret == QMessageBox::Cancel) {
-
-
+ 778 bool IntelliPhotoGui::maybeSave(){
+
+
+ 781 QMessageBox::StandardButton ret;
+
+
+
+ 785 ret = QMessageBox::warning(
this, tr(
"Painting"),
+ 786 tr(
"The image has been modified.\n"
+ 787 "Do you want to save your changes?"),
+ 788 QMessageBox::Save | QMessageBox::Discard
+ 789 | QMessageBox::Cancel);
+
+
+ 792 if (ret == QMessageBox::Save) {
+ 793 return saveFile(
"png");
+
+
+ 796 }
else if (ret == QMessageBox::Cancel) {
+
-
-
-
- 802 bool IntelliPhotoGui::saveFile(
const QByteArray &fileFormat){
-
- 804 QString initialPath = QDir::currentPath() +
"/untitled." + fileFormat;
-
-
-
- 808 QString fileName = QFileDialog::getSaveFileName(
this, tr(
"Save As"),
-
- 810 tr(
"%1 Files (*.%2);;All Files (*)")
- 811 .arg(QString::fromLatin1(fileFormat.toUpper()))
- 812 .arg(QString::fromLatin1(fileFormat)),
nullptr, QFileDialog::DontUseNativeDialog);
-
-
- 815 if (fileName.isEmpty()) {
-
-
-
- 819 return paintingArea->
save(fileName, fileFormat.constData());
-
-
-
- 823 void IntelliPhotoGui::setDefaultToolValue(){
-
-
-
-
-
-
- 830 }
else if(value > 50) {
-
-
- 833 EditLineWidth->setText(QString(
"%1").arg(value));
-
-
-
-
- 838 ActiveLayerLine->setText(
string);
-
-
-
- 842 preview = preview.fromImage(activePicture->
getImageData());
-
- 844 QImage tmp(1,1,QImage::Format_ARGB32);
- 845 tmp.fill(Qt::transparent);
- 846 preview = preview.fromImage(tmp);
-
- 848 ActiveLayerImageLabel->setPixmap(preview.scaled(Buttonsize * 2));
-
-
- 851 FirstColorButton->setStyleSheet(
string);
-
- 853 SecondColorButton->setStyleSheet(
string);
-
- 855 string = QString(
"%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height());
- 856 dimCanvas->setText(
string);
-
- 858 if(paintingArea->layerBundle.size() != 0) {
- 859 string = QString(
"%1x%2").arg(paintingArea->layerBundle[
static_cast<unsigned long long>(paintingArea->
getNumberOfActiveLayer())].width).arg(paintingArea->layerBundle[
static_cast<unsigned long long>(paintingArea->
getNumberOfActiveLayer())].height);
- 860 dimActive->setText(
string);
-
-
- 863 dimActive->setText(
"0x0");
+
+
+
+
+ 803 bool IntelliPhotoGui::saveFile(
const QByteArray &fileFormat){
+
+ 805 QString initialPath = QDir::currentPath() +
"/untitled." + fileFormat;
+
+
+
+ 809 QString fileName = QFileDialog::getSaveFileName(
this, tr(
"Save As"),
+
+ 811 tr(
"%1 Files (*.%2);;All Files (*)")
+ 812 .arg(QString::fromLatin1(fileFormat.toUpper()))
+ 813 .arg(QString::fromLatin1(fileFormat)),
nullptr, QFileDialog::DontUseNativeDialog);
+
+
+ 816 if (fileName.isEmpty()) {
+
+
+
+ 820 return paintingArea->
save(fileName, fileFormat.constData());
+
+
+
+ 824 void IntelliPhotoGui::setDefaultToolValue(){
+
+
+
+
+
+
+ 831 }
else if(value > 50) {
+
+
+ 834 EditLineWidth->setText(QString(
"%1").arg(value));
+
+
+
+
+ 839 ActiveLayerLine->setText(
string);
+
+
+
+ 843 preview = preview.fromImage(activePicture->
getImageData());
+
+ 845 QImage tmp(1,1,QImage::Format_ARGB32);
+ 846 tmp.fill(Qt::transparent);
+ 847 preview = preview.fromImage(tmp);
+
+ 849 ActiveLayerImageLabel->setPixmap(preview.scaled(Buttonsize * 2));
+
+
+ 852 FirstColorButton->setStyleSheet(
string);
+
+ 854 SecondColorButton->setStyleSheet(
string);
+
+ 856 string = QString(
"%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height());
+ 857 dimCanvas->setText(
string);
+
+ 859 if(paintingArea->layerBundle.size() != 0) {
+ 860 string = QString(
"%1x%2").arg(paintingArea->layerBundle[
static_cast<size_t>
+
+
+ 863 dimActive->setText(
string);
-
+
+ 866 dimActive->setText(
"0x0");
+
+
+QColor getFirstColor() const
A function to read the primary selected color.
void setRenderSettings(bool isFastRenderingOn)
setRenderSettings updates all Images to the new Rendersetting.
IntelliImage * getImageOfActiveLayer()
void createRectangleTool()
@@ -963,11 +967,11 @@ $(document).ready(function(){initNavTree('_intelli_photo_gui_8cpp_source.html','
void setLayerActive(int idx)
The setLayerToActive method marks a specific layer as active.
void deleteLayer(int idx, bool isTool=false)
The deleteLayer method removes a layer at a given idx.
-QColor getSecondColor()
A function to read the secondary selected color.
-IntelliPhotoGui()
The IntelliPhotoGui method is the constructor and is used to create a new instance of the main progra...
+IntelliPhotoGui()
The IntelliPhotoGui method is the constructor and is used to create a new instance of the main progra...
The PaintingArea class manages the methods and stores information about the current painting area,...
+QColor getSecondColor() const
A function to read the secondary selected color.
void colorPickerSetSecondColor()
The colorPickerSetSecondColor calls the QTColorPicker to determine the secondary drawing color.
void colorPickerSetFirstColor()
The colorPickerSetFirstColor calls the QTColorPicker to determine the primary drawing color.
@@ -975,18 +979,17 @@ $(document).ready(function(){initNavTree('_intelli_photo_gui_8cpp_source.html','
int getNumberOfActiveLayer()
-void closeEvent(QCloseEvent *event) override
The closeEvent function handles closing events.
+void closeEvent(QCloseEvent *event) override
The closeEvent function handles closing events.
virtual QImage getImageData()
getImageData returns the data of the current image (Note: It will allways return a ARGB32bit QImage!...
-void setToolWidth(int value)
+void setToolWidth(int value)
bool open(const QString &filePath)
The open method is used for loading a picture into the current layer.
void moveActiveLayer(int idx)
The moveActiveLayer moves the active layer to a specific position in the layer stack.
IntelliColorPicker colorPicker
-QColor getFirstColor()
A function to read the primary selected color.
void createFloodFillTool()
-
+
IntelliToolsettings Toolsettings
void setPolygon(int idx)
setPolygon is used for setting polygondata, it only works on RASTER images
diff --git a/docs/html/_intelli_photo_gui_8h_source.html b/docs/html/_intelli_photo_gui_8h_source.html
index e75e8b8..5a4d433 100644
--- a/docs/html/_intelli_photo_gui_8h_source.html
+++ b/docs/html/_intelli_photo_gui_8h_source.html
@@ -290,13 +290,13 @@ $(document).ready(function(){initNavTree('_intelli_photo_gui_8h_source.html','')
The IntelliPhotoGui base class handles the graphical user interface and events for the intelliPhoto p...
-IntelliPhotoGui()
The IntelliPhotoGui method is the constructor and is used to create a new instance of the main progra...
+IntelliPhotoGui()
The IntelliPhotoGui method is the constructor and is used to create a new instance of the main progra...
The PaintingArea class manages the methods and stores information about the current painting area,...
-void closeEvent(QCloseEvent *event) override
The closeEvent function handles closing events.
-void setToolWidth(int value)
+void closeEvent(QCloseEvent *event) override
The closeEvent function handles closing events.
+void setToolWidth(int value)
The IntelliColorPicker manages the selected colors for one whole project.
-
+
diff --git a/docs/html/_intelli_render_settings_8cpp_source.html b/docs/html/_intelli_render_settings_8cpp_source.html
index cb577bf..c3d411f 100644
--- a/docs/html/_intelli_render_settings_8cpp_source.html
+++ b/docs/html/_intelli_render_settings_8cpp_source.html
@@ -97,13 +97,13 @@ $(document).ready(function(){initNavTree('_intelli_render_settings_8cpp_source.h
9 this->fastRenderering = Updatedsetting;
-
+
13 return fastRenderering;
+bool isFastRenderering() const
The getfastRenderer gets the value of the flag for the fastRenderer setting.
-bool isFastRenderering()
The getfastRenderer gets the value of the flag for the fastRenderer setting.
void setFastRendering(bool Updatedsetting)
setFastRendering sets fastRendering to Updatedsetting.
diff --git a/docs/html/_intelli_render_settings_8h_source.html b/docs/html/_intelli_render_settings_8h_source.html
index 0ec563e..6f1d440 100644
--- a/docs/html/_intelli_render_settings_8h_source.html
+++ b/docs/html/_intelli_render_settings_8h_source.html
@@ -100,7 +100,7 @@ $(document).ready(function(){initNavTree('_intelli_render_settings_8h_source.htm
-
+
26 bool fastRenderering =
true;
@@ -109,8 +109,8 @@ $(document).ready(function(){initNavTree('_intelli_render_settings_8h_source.htm
+bool isFastRenderering() const
The getfastRenderer gets the value of the flag for the fastRenderer setting.
-bool isFastRenderering()
The getfastRenderer gets the value of the flag for the fastRenderer setting.
void setFastRendering(bool Updatedsetting)
setFastRendering sets fastRendering to Updatedsetting.
diff --git a/docs/html/_intelli_tool_8cpp_source.html b/docs/html/_intelli_tool_8cpp_source.html
index d82daad..3442d23 100644
--- a/docs/html/_intelli_tool_8cpp_source.html
+++ b/docs/html/_intelli_tool_8cpp_source.html
@@ -138,7 +138,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_8cpp_source.html',''); i
-
+
56 bool IntelliTool::createToolLayer(){
@@ -184,21 +184,24 @@ $(document).ready(function(){initNavTree('_intelli_tool_8cpp_source.html',''); i
-
+
-
+
+
+
+
void deleteLayer(int idx, bool isTool=false)
The deleteLayer method removes a layer at a given idx.
@@ -208,22 +211,19 @@ $(document).ready(function(){initNavTree('_intelli_tool_8cpp_source.html',''); i
virtual std::vector< QPoint > getPolygonData()
A function that returns the Polygondata if existent.
-
int width
width - Stores the width of a layer in pixels.
virtual QImage getImageData()
getImageData returns the data of the current image (Note: It will allways return a ARGB32bit QImage!...
virtual void setImageData(const QImage &newData)
setImageData overwrites the old imageData the new imageData.
-void setToolWidth(int value)
-
+void setToolWidth(int value)
int height
height - Stores the height of a layer in pixels.
The IntelliColorPicker manages the selected colors for one whole project.
-
+
QImage imageData
The underlying image data.
IntelliImage * image
image - Stores the imageData of the current LayerObject.
-
virtual void calculateVisiblity()=0
An abstract function that calculates the visiblity of the Image data if needed.
diff --git a/docs/html/_intelli_tool_8h_source.html b/docs/html/_intelli_tool_8h_source.html
index 4ea26a9..bb77a09 100644
--- a/docs/html/_intelli_tool_8h_source.html
+++ b/docs/html/_intelli_tool_8h_source.html
@@ -150,9 +150,9 @@ $(document).ready(function(){initNavTree('_intelli_tool_8h_source.html',''); ini
-
+
-
+
@@ -163,7 +163,9 @@ $(document).ready(function(){initNavTree('_intelli_tool_8h_source.html',''); ini
+
+
@@ -177,10 +179,8 @@ $(document).ready(function(){initNavTree('_intelli_tool_8h_source.html',''); ini
-
-
The IntelliColorPicker manages the selected colors for one whole project.
diff --git a/docs/html/_intelli_tool_circle_8cpp_source.html b/docs/html/_intelli_tool_circle_8cpp_source.html
index 226fc56..7abbcc6 100644
--- a/docs/html/_intelli_tool_circle_8cpp_source.html
+++ b/docs/html/_intelli_tool_circle_8cpp_source.html
@@ -101,8 +101,8 @@ $(document).ready(function(){initNavTree('_intelli_tool_circle_8cpp_source.html'
15 void IntelliToolCircle::drawCircle(
int radius){
-
-
+
+
18 int yMinimum, yMaximum, xMinimum, xMaximum;
19 yMinimum = centerPoint.y() - radius;
20 yMaximum = centerPoint.y() + radius;
@@ -114,14 +114,14 @@ $(document).ready(function(){initNavTree('_intelli_tool_circle_8cpp_source.html'
-
+
30 yMinimum = (centerPoint.y() - radius);
31 yMaximum = (centerPoint.y() + radius);
32 for(
int i = yMinimum; i<=yMaximum; i++) {
33 xMinimum =
static_cast<int>(centerPoint.x() - sqrt(pow(radius,2) - pow(i - centerPoint.y(),2)));
34 xMaximum =
static_cast<int>(centerPoint.x() + sqrt(pow(radius,2) - pow(i - centerPoint.y(),2)));
-
-
+
+
39 xMinimum = (centerPoint.x() - radius);
@@ -129,8 +129,8 @@ $(document).ready(function(){initNavTree('_intelli_tool_circle_8cpp_source.html'
41 for(
int i = xMinimum; i<=xMaximum; i++) {
42 int yMin =
static_cast<int>(centerPoint.y() - sqrt(pow(radius,2) - pow(i - centerPoint.x(),2)));
43 int yMax =
static_cast<int>(centerPoint.y() + sqrt(pow(radius,2) - pow(i - centerPoint.x(),2)));
-
-
+
+
@@ -158,7 +158,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_circle_8cpp_source.html'
-
+
@@ -174,17 +174,19 @@ $(document).ready(function(){initNavTree('_intelli_tool_circle_8cpp_source.html'
+QColor getFirstColor() const
A function to read the primary selected color.
+
virtual void drawLine(const QPoint &p1, const QPoint &p2, const QColor &color, const int &penWidth)
A function that draws a line between two given points in a given color.
-QColor getSecondColor()
A function to read the secondary selected color.
+
The PaintingArea class manages the methods and stores information about the current painting area,...
-
+QColor getSecondColor() const
A function to read the secondary selected color.
virtual void drawPoint(const QPoint &p1, const QColor &color, const int &penWidth)
A function that draws a point between on a given point in a given color.
@@ -192,14 +194,12 @@ $(document).ready(function(){initNavTree('_intelli_tool_circle_8cpp_source.html'
-QColor getFirstColor()
A function to read the primary selected color.
The IntelliColorPicker manages the selected colors for one whole project.
IntelliImage * image
image - Stores the imageData of the current LayerObject.
-
virtual void calculateVisiblity()=0
An abstract function that calculates the visiblity of the Image data if needed.
diff --git a/docs/html/_intelli_tool_flood_fill_8cpp_source.html b/docs/html/_intelli_tool_flood_fill_8cpp_source.html
index ed19a8b..dcbec6c 100644
--- a/docs/html/_intelli_tool_flood_fill_8cpp_source.html
+++ b/docs/html/_intelli_tool_flood_fill_8cpp_source.html
@@ -121,7 +121,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_flood_fill_8cpp_source.h
-
+
37 if(newColor == oldColor) {
@@ -172,6 +172,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_flood_fill_8cpp_source.h
+QColor getFirstColor() const
A function to read the primary selected color.
@@ -192,7 +193,6 @@ $(document).ready(function(){initNavTree('_intelli_tool_flood_fill_8cpp_source.h
-QColor getFirstColor()
A function to read the primary selected color.
virtual QColor getPixelColor(QPoint &point)
A function that returns the pixelcolor at a certain point.
int height
height - Stores the height of a layer in pixels.
diff --git a/docs/html/_intelli_tool_line_8cpp_source.html b/docs/html/_intelli_tool_line_8cpp_source.html
index 1787628..1982683 100644
--- a/docs/html/_intelli_tool_line_8cpp_source.html
+++ b/docs/html/_intelli_tool_line_8cpp_source.html
@@ -111,7 +111,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_line_8cpp_source.html','
25 this->lineStartingPoint = QPoint(x,y);
-
+
@@ -121,21 +121,23 @@ $(document).ready(function(){initNavTree('_intelli_tool_line_8cpp_source.html','
-
+
-
+
+QColor getFirstColor() const
A function to read the primary selected color.
+
virtual void drawLine(const QPoint &p1, const QPoint &p2, const QColor &color, const int &penWidth)
A function that draws a line between two given points in a given color.
@@ -155,14 +157,12 @@ $(document).ready(function(){initNavTree('_intelli_tool_line_8cpp_source.html','
-QColor getFirstColor()
A function to read the primary selected color.
The IntelliColorPicker manages the selected colors for one whole project.
IntelliImage * image
image - Stores the imageData of the current LayerObject.
-
virtual void calculateVisiblity()=0
An abstract function that calculates the visiblity of the Image data if needed.
diff --git a/docs/html/_intelli_tool_pen_8cpp_source.html b/docs/html/_intelli_tool_pen_8cpp_source.html
index 586fe43..8dbea6d 100644
--- a/docs/html/_intelli_tool_pen_8cpp_source.html
+++ b/docs/html/_intelli_tool_pen_8cpp_source.html
@@ -112,7 +112,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_pen_8cpp_source.html',''
26 this->previousPoint = QPoint(x,y);
-
+
@@ -123,7 +123,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_pen_8cpp_source.html',''
-
+
39 this->previousPoint = newPoint;
@@ -131,13 +131,15 @@ $(document).ready(function(){initNavTree('_intelli_tool_pen_8cpp_source.html',''
-
+
+QColor getFirstColor() const
A function to read the primary selected color.
+
virtual void drawLine(const QPoint &p1, const QPoint &p2, const QColor &color, const int &penWidth)
A function that draws a line between two given points in a given color.
@@ -155,13 +157,11 @@ $(document).ready(function(){initNavTree('_intelli_tool_pen_8cpp_source.html',''
-QColor getFirstColor()
A function to read the primary selected color.
The IntelliColorPicker manages the selected colors for one whole project.
IntelliImage * image
image - Stores the imageData of the current LayerObject.
-
diff --git a/docs/html/_intelli_tool_plain_8cpp_source.html b/docs/html/_intelli_tool_plain_8cpp_source.html
index 0d7c0fa..569c21b 100644
--- a/docs/html/_intelli_tool_plain_8cpp_source.html
+++ b/docs/html/_intelli_tool_plain_8cpp_source.html
@@ -101,7 +101,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_plain_8cpp_source.html',
-
+
@@ -127,6 +127,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_plain_8cpp_source.html',
+QColor getFirstColor() const
A function to read the primary selected color.
@@ -141,7 +142,6 @@ $(document).ready(function(){initNavTree('_intelli_tool_plain_8cpp_source.html',
-QColor getFirstColor()
A function to read the primary selected color.
The IntelliColorPicker manages the selected colors for one whole project.
diff --git a/docs/html/_intelli_tool_polygon_8cpp_source.html b/docs/html/_intelli_tool_polygon_8cpp_source.html
index 2c3d7b1..5c0af5b 100644
--- a/docs/html/_intelli_tool_polygon_8cpp_source.html
+++ b/docs/html/_intelli_tool_polygon_8cpp_source.html
@@ -136,7 +136,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
48 drawingOfPolygon =
true;
49 QPointList.push_back(drawingPoint);
-
+
52 if(!isSettingPolygon) {
@@ -144,7 +144,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
56 else if(drawingOfPolygon && QPointList.size() > 0 && isNearStart(x,y,QPointList.front())) {
57 if(QPointList.size() > 2) {
58 isPointNearStart =
true;
-
+
60 if(!isSettingPolygon) {
@@ -161,7 +161,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
73 else if(drawingOfPolygon) {
74 QPoint drawingPoint(x,y);
75 QPointList.push_back(drawingPoint);
-
+
77 if(!isSettingPolygon) {
@@ -184,8 +184,8 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
96 if(!isSettingPolygon) {
-
-
+
+
@@ -196,7 +196,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
109 for(
int i = 0; i<static_cast<int>(QPointList.size()); i++) {
110 int next =
static_cast<int>((i +
static_cast<int>(1)) %
static_cast<int>(QPointList.size()));
-
+
@@ -217,7 +217,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
129 if(!isSettingPolygon) {
-
+
@@ -240,7 +240,9 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
+QColor getFirstColor() const
A function to read the primary selected color.
+
virtual void drawLine(const QPoint &p1, const QPoint &p2, const QColor &color, const int &penWidth)
A function that draws a line between two given points in a given color.
@@ -248,12 +250,12 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
virtual void drawPixel(const QPoint &p1, const QColor &color)
A funtcion used to draw a pixel on the Image with the given Color.
std::vector< Triangle > calculateTriangles(std::vector< QPoint > polyPoints)
A function to split a polygon in its spanning traingles by using Meisters Theorem of graph theory by ...
+
-QColor getSecondColor()
A function to read the secondary selected color.
The PaintingArea class manages the methods and stores information about the current painting area,...
-
+QColor getSecondColor() const
A function to read the secondary selected color.
virtual void drawPoint(const QPoint &p1, const QColor &color, const int &penWidth)
A function that draws a point between on a given point in a given color.
@@ -267,7 +269,6 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
virtual void setImageData(const QImage &newData)
setImageData overwrites the old imageData the new imageData.
-QColor getFirstColor()
A function to read the primary selected color.
int height
height - Stores the height of a layer in pixels.
QImage getImageDataOfActiveLayer()
getImageDataOfActiveLayer used to get the currents active imageData (if there isn't any active layer ...
@@ -277,7 +278,6 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
IntelliImage * image
image - Stores the imageData of the current LayerObject.
std::vector< QPoint > getPolygonDataOfRealLayer()
-
diff --git a/docs/html/_intelli_tool_rectangle_8cpp_source.html b/docs/html/_intelli_tool_rectangle_8cpp_source.html
index acbcd84..c673a22 100644
--- a/docs/html/_intelli_tool_rectangle_8cpp_source.html
+++ b/docs/html/_intelli_tool_rectangle_8cpp_source.html
@@ -106,15 +106,15 @@ $(document).ready(function(){initNavTree('_intelli_tool_rectangle_8cpp_source.ht
18 int yMin = std::min(originCorner.y(), otherCorner.y());
19 int yMax = std::max(originCorner.y(), otherCorner.y());
-
-
+
+
23 for(
int y = yMin; y<=yMax; y++) {
-
-
-
-
+
+
+
+
@@ -147,38 +147,38 @@ $(document).ready(function(){initNavTree('_intelli_tool_rectangle_8cpp_source.ht
-
+
+QColor getFirstColor() const
A function to read the primary selected color.
+
virtual void drawLine(const QPoint &p1, const QPoint &p2, const QColor &color, const int &penWidth)
A function that draws a line between two given points in a given color.
+
-QColor getSecondColor()
A function to read the secondary selected color.
The PaintingArea class manages the methods and stores information about the current painting area,...
-
+QColor getSecondColor() const
A function to read the secondary selected color.
-QColor getFirstColor()
A function to read the primary selected color.
The IntelliColorPicker manages the selected colors for one whole project.
IntelliImage * image
image - Stores the imageData of the current LayerObject.
-
virtual void calculateVisiblity()=0
An abstract function that calculates the visiblity of the Image data if needed.
diff --git a/docs/html/_intelli_toolsettings_8cpp_source.html b/docs/html/_intelli_toolsettings_8cpp_source.html
index cd32ac5..f88860a 100644
--- a/docs/html/_intelli_toolsettings_8cpp_source.html
+++ b/docs/html/_intelli_toolsettings_8cpp_source.html
@@ -99,7 +99,7 @@ $(document).ready(function(){initNavTree('_intelli_toolsettings_8cpp_source.html
-
+
@@ -113,7 +113,7 @@ $(document).ready(function(){initNavTree('_intelli_toolsettings_8cpp_source.html
25 lineWidth = LineWidth;
-
+
29 return this->innerAlpha;
@@ -128,12 +128,12 @@ $(document).ready(function(){initNavTree('_intelli_toolsettings_8cpp_source.html
+
+
-
-
diff --git a/docs/html/_intelli_toolsettings_8h_source.html b/docs/html/_intelli_toolsettings_8h_source.html
index 2456f08..a6634f0 100644
--- a/docs/html/_intelli_toolsettings_8h_source.html
+++ b/docs/html/_intelli_toolsettings_8h_source.html
@@ -98,10 +98,10 @@ $(document).ready(function(){initNavTree('_intelli_toolsettings_8h_source.html',
-
+
-
+
@@ -112,12 +112,12 @@ $(document).ready(function(){initNavTree('_intelli_toolsettings_8h_source.html',
+
+
-
-
diff --git a/docs/html/_painting_area_8cpp_source.html b/docs/html/_painting_area_8cpp_source.html
index cf1f6de..c073e81 100644
--- a/docs/html/_painting_area_8cpp_source.html
+++ b/docs/html/_painting_area_8cpp_source.html
@@ -123,12 +123,12 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
-
+
-
+
45 for(
auto& layer : layerBundle) {
46 layer.image->updateRendererSetting(isFastRenderingOn);
@@ -155,9 +155,9 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
-
+
-
+
75 this->layerBundle.push_back(newLayer);
@@ -273,12 +273,12 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
- 188 QColor clr = QColorDialog::getColor(
colorPicker.
getFirstColor(),
nullptr,
"Main Color", QColorDialog::DontUseNativeDialog);
+ 188 QColor clr = QColorDialog::getColor(
colorPicker.
getFirstColor(),
nullptr,
"Main Color", QColorDialog::DontUseNativeDialog);
- 193 QColor clr = QColorDialog::getColor(
colorPicker.
getSecondColor(),
nullptr,
"Secondary Color", QColorDialog::DontUseNativeDialog);
+ 193 QColor clr = QColorDialog::getColor(
colorPicker.
getSecondColor(),
nullptr,
"Secondary Color", QColorDialog::DontUseNativeDialog);
@@ -321,11 +321,11 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
- 236 return this->layerBundle[
static_cast<unsigned long long>(activeLayer)].width;
+ 236 return this->layerBundle[
static_cast<size_t>(activeLayer)].width;
- 240 return this->layerBundle[
static_cast<unsigned long long>(activeLayer)].height;
+ 240 return this->layerBundle[
static_cast<size_t>(activeLayer)].height;
@@ -337,11 +337,11 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
- 252 return this->layerBundle[
static_cast<unsigned long long>(activeLayer)].image->getTypeOfImage();
+ 252 return this->layerBundle[
static_cast<size_t>(activeLayer)].image->getTypeOfImage();
- 256 return this->layerBundle[
static_cast<unsigned long long>(activeLayer)].image->getPolygonData();
+ 256 return this->layerBundle[
static_cast<size_t>(activeLayer)].image->getPolygonData();
@@ -353,8 +353,8 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
- 268 int x =
event->x() - layerBundle[
static_cast<unsigned long long>(activeLayer)].widthOffset;
- 269 int y =
event->y() - layerBundle[
static_cast<unsigned long long>(activeLayer)].heightOffset;
+ 268 int x =
event->x() - layerBundle[
static_cast<size_t>(activeLayer)].widthOffset;
+ 269 int y =
event->y() - layerBundle[
static_cast<size_t>(activeLayer)].heightOffset;
270 if(event->button() == Qt::LeftButton) {
272 }
else if(event->button() == Qt::RightButton) {
@@ -372,8 +372,8 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
- 287 int x =
event->x() - layerBundle[
static_cast<unsigned long long>(activeLayer)].widthOffset;
- 288 int y =
event->y() - layerBundle[
static_cast<unsigned long long>(activeLayer)].heightOffset;
+ 287 int x =
event->x() - layerBundle[
static_cast<size_t>(activeLayer)].widthOffset;
+ 288 int y =
event->y() - layerBundle[
static_cast<size_t>(activeLayer)].heightOffset;
@@ -384,8 +384,8 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
- 299 int x =
event->x() - layerBundle[
static_cast<unsigned long long>(activeLayer)].widthOffset;
- 300 int y =
event->y() - layerBundle[
static_cast<unsigned long long>(activeLayer)].heightOffset;
+ 299 int x =
event->x() - layerBundle[
static_cast<size_t>(activeLayer)].widthOffset;
+ 300 int y =
event->y() - layerBundle[
static_cast<size_t>(activeLayer)].heightOffset;
301 if(event->button() == Qt::LeftButton) {
303 }
else if(event->button() == Qt::RightButton) {
@@ -429,7 +429,7 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
341 void PaintingArea::selectLayerDown(){
- 344 std::swap(layerBundle[
static_cast<unsigned long long>(activeLayer)], layerBundle[
static_cast<unsigned long long>(activeLayer - 1)]);
+ 344 std::swap(layerBundle[
static_cast<size_t>(activeLayer)], layerBundle[
static_cast<size_t>(activeLayer - 1)]);
@@ -473,11 +473,11 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
387 newLayer.
alpha = 255;
- 388 newLayer.
height = layerBundle[
static_cast<unsigned long long>(idx)].height;
- 389 newLayer.
width = layerBundle[
static_cast<unsigned long long>(idx)].width;
- 390 newLayer.
heightOffset = layerBundle[
static_cast<unsigned long long>(idx)].heightOffset;
- 391 newLayer.
widthOffset = layerBundle[
static_cast<unsigned long long>(idx)].widthOffset;
- 392 newLayer.
image = layerBundle[
static_cast<unsigned long long>(idx)].image->getDeepCopy();
+ 388 newLayer.
height = layerBundle[
static_cast<size_t>(idx)].height;
+ 389 newLayer.
width = layerBundle[
static_cast<size_t>(idx)].width;
+ 390 newLayer.
heightOffset = layerBundle[
static_cast<size_t>(idx)].heightOffset;
+ 391 newLayer.
widthOffset = layerBundle[
static_cast<size_t>(idx)].widthOffset;
+ 392 newLayer.
image = layerBundle[
static_cast<size_t>(idx)].image->getDeepCopy();
393 layerBundle.insert(layerBundle.begin() + idx + 1,newLayer);
@@ -485,7 +485,7 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
-
+
@@ -516,7 +516,7 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
430 returnImage = layerBundle[
static_cast<size_t>(activeLayer)].image->getImageData();
-
+
432 returnImage = returnImage.convertToFormat(QImage::Format_ARGB32);
@@ -525,7 +525,7 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
438 void PaintingArea::updateTools(){
-
+
@@ -543,6 +543,7 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
+QColor getFirstColor() const
A function to read the primary selected color.
void setRenderSettings(bool isFastRenderingOn)
setRenderSettings updates all Images to the new Rendersetting.
IntelliImage * getImageOfActiveLayer()
@@ -550,9 +551,12 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
void createRectangleTool()
+
+bool isFastRenderering() const
The getfastRenderer gets the value of the flag for the fastRenderer setting.
bool save(const QString &filePath, const char *fileFormat)
The save method is used for exporting the current project as one picture.
+
void setLayerAlpha(int idx, int alpha)
The setAlphaOfLayer method sets the alpha value of a specific layer.
void setLayerActive(int idx)
The setLayerToActive method marks a specific layer as active.
@@ -562,7 +566,6 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
void setSecondColor(QColor Color)
A function to set the secondary color.
The IntelliShapedImage manages a Shapedimage.
-QColor getSecondColor()
A function to read the secondary selected color.
int heightOffset
heightOffset - Stores the number of pixles from the top of the painting area.
int getHeightOfActive()
The getHeightOfActive gets the vertical dimensions of the active layer.
@@ -575,6 +578,7 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
void mousePressEvent(QMouseEvent *event) override
int alpha
alpha - Stores the alpha value of the layer (default=255).
+QColor getSecondColor() const
A function to read the secondary selected color.
@@ -584,11 +588,9 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
void colorPickerSetFirstColor()
The colorPickerSetFirstColor calls the QTColorPicker to determine the primary drawing color.
-
IntelliImage::ImageType getTypeOfImageRealLayer()
int width
width - Stores the width of a layer in pixels.
-bool isFastRenderering()
The getfastRenderer gets the value of the flag for the fastRenderer setting.
~PaintingArea() override
This deconstructor is used to clear up the memory and remove the currently active window.
void mouseMoveEvent(QMouseEvent *event) override
int getNumberOfActiveLayer()
@@ -596,22 +598,20 @@ $(document).ready(function(){initNavTree('_painting_area_8cpp_source.html','');
void slotDeleteActiveLayer()
The slotDeleteActiveLayer method handles the deletion of the active layer.
-void setToolWidth(int value)
+void setToolWidth(int value)
bool open(const QString &filePath)
The open method is used for loading a picture into the current layer.
void moveActiveLayer(int idx)
The moveActiveLayer moves the active layer to a specific position in the layer stack.
IntelliColorPicker colorPicker
PaintingArea(int maxWidth=600, int maxHeight=600, QWidget *parent=nullptr)
PaintingArea is the constructor of the PaintingArea class, which initiates the working environment.
-
-QColor getFirstColor()
A function to read the primary selected color.
int height
height - Stores the height of a layer in pixels.
QImage getImageDataOfActiveLayer()
getImageDataOfActiveLayer used to get the currents active imageData (if there isn't any active layer ...
void createFloodFillTool()
void slotActivateLayer(int a)
The slotActivateLayer method handles the event of selecting one layer as active.
void paintEvent(QPaintEvent *event) override
void setFastRendering(bool Updatedsetting)
setFastRendering sets fastRendering to Updatedsetting.
-
+
IntelliImage * image
image - Stores the imageData of the current LayerObject.
diff --git a/docs/html/class_intelli_color_picker-members.html b/docs/html/class_intelli_color_picker-members.html
index f8805e4..70ea16b 100644
--- a/docs/html/class_intelli_color_picker-members.html
+++ b/docs/html/class_intelli_color_picker-members.html
@@ -89,8 +89,8 @@ $(document).ready(function(){initNavTree('class_intelli_color_picker.html','');
This is the complete list of members for IntelliColorPicker, including all inherited members.
@@ -197,8 +197,8 @@ Public Member Functions
-
-◆ getSecondColor()
+
+◆ getSecondColor()
@@ -207,7 +207,7 @@ Public Member Functions
QColor IntelliColorPicker::getSecondColor |
( |
| ) |
- |
+ const |
diff --git a/docs/html/class_intelli_color_picker.js b/docs/html/class_intelli_color_picker.js
index 4d29d13..f02759d 100644
--- a/docs/html/class_intelli_color_picker.js
+++ b/docs/html/class_intelli_color_picker.js
@@ -2,8 +2,8 @@ var class_intelli_color_picker =
[
[ "IntelliColorPicker", "class_intelli_color_picker.html#a0d1247bdd87add1396ea5d9acaad79ae", null ],
[ "~IntelliColorPicker", "class_intelli_color_picker.html#a40b975268a1f05249e8a49dde9a862ff", null ],
- [ "getFirstColor", "class_intelli_color_picker.html#aae2eb27b928fe9388b9398b0556303b7", null ],
- [ "getSecondColor", "class_intelli_color_picker.html#a55568fbf5dc783f06284b7031ffe9415", null ],
+ [ "getFirstColor", "class_intelli_color_picker.html#aeb08029a0c946ed0402c9c11a91965b1", null ],
+ [ "getSecondColor", "class_intelli_color_picker.html#ab41abe8fb7e184db2c33e792f09792e0", null ],
[ "setFirstColor", "class_intelli_color_picker.html#a7e2ddbbbfbed383f06b24e5bf6b27ae8", null ],
[ "setSecondColor", "class_intelli_color_picker.html#a86bf4a940e4a0e465e30cbdf28748931", null ],
[ "swapColors", "class_intelli_color_picker.html#aec499265ae28ce1b54be88222e74292e", null ]
diff --git a/docs/html/class_intelli_photo_gui.html b/docs/html/class_intelli_photo_gui.html
index 6fb134a..6e81f67 100644
--- a/docs/html/class_intelli_photo_gui.html
+++ b/docs/html/class_intelli_photo_gui.html
@@ -140,7 +140,7 @@ Protected Member Functions
The IntelliPhotoGui method is the constructor and is used to create a new instance of the main program window.
-
Definition at line 7 of file IntelliPhotoGui.cpp.
+
Definition at line 10 of file IntelliPhotoGui.cpp.
@@ -171,7 +171,7 @@ Protected Member Functions
The closeEvent function handles closing events.
-Definition at line 23 of file IntelliPhotoGui.cpp.
+Definition at line 26 of file IntelliPhotoGui.cpp.
@@ -191,7 +191,7 @@ Protected Member Functions
@@ -210,7 +210,7 @@ Protected Member Functions
diff --git a/docs/html/class_intelli_render_settings-members.html b/docs/html/class_intelli_render_settings-members.html
index 286cbf1..b6b8a9d 100644
--- a/docs/html/class_intelli_render_settings-members.html
+++ b/docs/html/class_intelli_render_settings-members.html
@@ -90,7 +90,7 @@ $(document).ready(function(){initNavTree('class_intelli_render_settings.html',''
This is the complete list of members for IntelliRenderSettings, including all inherited members.
diff --git a/docs/html/class_intelli_render_settings.html b/docs/html/class_intelli_render_settings.html
index af57bb6..5f148f2 100644
--- a/docs/html/class_intelli_render_settings.html
+++ b/docs/html/class_intelli_render_settings.html
@@ -99,9 +99,9 @@ Public Member Functions
| void | setFastRendering (bool Updatedsetting) |
| | setFastRendering sets fastRendering to Updatedsetting. More...
|
| |
-| bool | isFastRenderering () |
-| | The getfastRenderer gets the value of the flag for the fastRenderer setting. More...
|
-| |
+| bool | isFastRenderering () const |
+| | The getfastRenderer gets the value of the flag for the fastRenderer setting. More...
|
+| |
@@ -127,8 +127,8 @@ Public Member Functions
-
-◆ isFastRenderering()
+
+◆ isFastRenderering()
@@ -137,7 +137,7 @@ Public Member Functions
bool IntelliRenderSettings::isFastRenderering |
( |
| ) |
- |
+ const |
diff --git a/docs/html/class_intelli_render_settings.js b/docs/html/class_intelli_render_settings.js
index e0dfe86..73ef9f6 100644
--- a/docs/html/class_intelli_render_settings.js
+++ b/docs/html/class_intelli_render_settings.js
@@ -1,6 +1,6 @@
var class_intelli_render_settings =
[
[ "IntelliRenderSettings", "class_intelli_render_settings.html#a4a01de6e5e8e516a7eae51d6f1f66529", null ],
- [ "isFastRenderering", "class_intelli_render_settings.html#a5d0eb9a5a3bf788dd87509386dea8dcd", null ],
+ [ "isFastRenderering", "class_intelli_render_settings.html#a38fd592c4948d2e47b95bb6fabc34073", null ],
[ "setFastRendering", "class_intelli_render_settings.html#a5ffb878b77e5d448ffe4eb03a8397ac2", null ]
];
\ No newline at end of file
diff --git a/docs/html/class_intelli_tool-members.html b/docs/html/class_intelli_tool-members.html
index e4e3767..735dda0 100644
--- a/docs/html/class_intelli_tool-members.html
+++ b/docs/html/class_intelli_tool-members.html
@@ -94,8 +94,8 @@ $(document).ready(function(){initNavTree('class_intelli_tool.html',''); initResi
| Area | IntelliTool | protected |
| Canvas | IntelliTool | protected |
| colorPicker | IntelliTool | protected |
-
| getIsDrawing() | IntelliTool | |
-
| getTooltype() | IntelliTool | |
+
| getIsDrawing() const | IntelliTool | |
+
| getTooltype() const | IntelliTool | |
| IntelliTool(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings) | IntelliTool | |
| isDrawing | IntelliTool | protected |
| onMouseLeftPressed(int x, int y) | IntelliTool | virtual |
diff --git a/docs/html/class_intelli_tool.html b/docs/html/class_intelli_tool.html
index 0550cf3..0f8070c 100644
--- a/docs/html/class_intelli_tool.html
+++ b/docs/html/class_intelli_tool.html
@@ -154,10 +154,10 @@ Public Member Functions
| virtual void | onMouseMoved (int x, int y) |
| | A function managing the mouse moved event. Call this in child classes! More...
|
| |
-
| Tooltype | getTooltype () |
-
| |
-
| bool | getIsDrawing () |
-
| |
+
| Tooltype | getTooltype () const |
+
| |
+
| bool | getIsDrawing () const |
+
| |
|
@@ -296,8 +296,8 @@ Protected Attributes
-
-◆ getIsDrawing()
+
+◆ getIsDrawing()
@@ -306,7 +306,7 @@ Protected Attributes
bool IntelliTool::getIsDrawing |
( |
| ) |
- |
+ const |
@@ -315,8 +315,8 @@ Protected Attributes
-
-◆ getTooltype()
+
+◆ getTooltype()
diff --git a/docs/html/class_intelli_tool.js b/docs/html/class_intelli_tool.js
index 34404b0..662a2c5 100644
--- a/docs/html/class_intelli_tool.js
+++ b/docs/html/class_intelli_tool.js
@@ -12,8 +12,8 @@ var class_intelli_tool =
] ],
[ "IntelliTool", "class_intelli_tool.html#a08ef094271ce6248b42f888472463526", null ],
[ "~IntelliTool", "class_intelli_tool.html#a57fb1b27d364c9e3696eb928b75fa9f2", null ],
- [ "getIsDrawing", "class_intelli_tool.html#a0020fad2e26315d5c4d96dbc95d1dceb", null ],
- [ "getTooltype", "class_intelli_tool.html#aae2a11c5bae4973ed827c60e0c1352b1", null ],
+ [ "getIsDrawing", "class_intelli_tool.html#af90f0965efbc5c25126691e998f39ca3", null ],
+ [ "getTooltype", "class_intelli_tool.html#adf5c06ad2b2c0d745fb68cf80e7e5694", null ],
[ "onMouseLeftPressed", "class_intelli_tool.html#a34b7ef1dde96b94a0ce450a25ae1778c", null ],
[ "onMouseLeftReleased", "class_intelli_tool.html#a906a2575c16c8a33cb2a5197f8d8cc5b", null ],
[ "onMouseMoved", "class_intelli_tool.html#ac10e20414cd8855a2f9b103fb6408639", null ],
diff --git a/docs/html/class_intelli_tool_circle-members.html b/docs/html/class_intelli_tool_circle-members.html
index 5b8892b..21834ef 100644
--- a/docs/html/class_intelli_tool_circle-members.html
+++ b/docs/html/class_intelli_tool_circle-members.html
@@ -94,8 +94,8 @@ $(document).ready(function(){initNavTree('class_intelli_tool_circle.html',''); i
| Area | IntelliTool | protected |
| Canvas | IntelliTool | protected |
| colorPicker | IntelliTool | protected |
-
| getIsDrawing() | IntelliTool | |
-
| getTooltype() | IntelliTool | |
+
| getIsDrawing() const | IntelliTool | |
+
| getTooltype() const | IntelliTool | |
| IntelliTool(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings) | IntelliTool | |
| IntelliToolCircle(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings) | IntelliToolCircle | |
| isDrawing | IntelliTool | protected |
diff --git a/docs/html/class_intelli_tool_circle.html b/docs/html/class_intelli_tool_circle.html
index af1c510..a7981de 100644
--- a/docs/html/class_intelli_tool_circle.html
+++ b/docs/html/class_intelli_tool_circle.html
@@ -137,10 +137,10 @@ Public Member Functions
| virtual | ~IntelliTool ()=0 |
| | An abstract Destructor. More...
|
| |
-
| Tooltype | getTooltype () |
-
| |
-
| bool | getIsDrawing () |
-
| |
+
| Tooltype | getTooltype () const |
+
| |
+
| bool | getIsDrawing () const |
+
| |
|
diff --git a/docs/html/class_intelli_tool_polygon-members.html b/docs/html/class_intelli_tool_polygon-members.html
index a566bcb..f6a0cbd 100644
--- a/docs/html/class_intelli_tool_polygon-members.html
+++ b/docs/html/class_intelli_tool_polygon-members.html
@@ -94,8 +94,8 @@ $(document).ready(function(){initNavTree('class_intelli_tool_polygon.html','');
| Area | IntelliTool | protected |
| Canvas | IntelliTool | protected |
| colorPicker | IntelliTool | protected |
- | getIsDrawing() | IntelliTool | |
- | getTooltype() | IntelliTool | |
+ | getIsDrawing() const | IntelliTool | |
+ | getTooltype() const | IntelliTool | |
| IntelliTool(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings) | IntelliTool | |
| IntelliToolPolygon(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings, bool isSettingPolygon=false) | IntelliToolPolygon | |
| isDrawing | IntelliTool | protected |
diff --git a/docs/html/class_intelli_tool_polygon.html b/docs/html/class_intelli_tool_polygon.html
index b0d734f..a30c226 100644
--- a/docs/html/class_intelli_tool_polygon.html
+++ b/docs/html/class_intelli_tool_polygon.html
@@ -137,10 +137,10 @@ Public Member Functions
| virtual | ~IntelliTool ()=0 |
| | An abstract Destructor. More...
|
| |
-| Tooltype | getTooltype () |
-| |
-| bool | getIsDrawing () |
-| |
+| Tooltype | getTooltype () const |
+| |
+| bool | getIsDrawing () const |
+| |
|
diff --git a/docs/html/class_intelli_toolsettings-members.html b/docs/html/class_intelli_toolsettings-members.html
index 0b4ba3b..01786c9 100644
--- a/docs/html/class_intelli_toolsettings-members.html
+++ b/docs/html/class_intelli_toolsettings-members.html
@@ -89,8 +89,8 @@ $(document).ready(function(){initNavTree('class_intelli_toolsettings.html','');
This is the complete list of members for IntelliToolsettings, including all inherited members.
@@ -158,8 +158,8 @@ Public Member Functions
-
-◆ getInnerAlpha()
+
+◆ getInnerAlpha()
@@ -168,7 +168,7 @@ Public Member Functions
int IntelliToolsettings::getInnerAlpha |
( |
| ) |
- |
+ const |
@@ -177,8 +177,8 @@ Public Member Functions
-
-◆ getLineWidth()
+
+◆ getLineWidth()
@@ -187,7 +187,7 @@ Public Member Functions
int IntelliToolsettings::getLineWidth |
( |
| ) |
- |
+ const |
diff --git a/docs/html/class_intelli_toolsettings.js b/docs/html/class_intelli_toolsettings.js
index 4cb8f44..628d2d8 100644
--- a/docs/html/class_intelli_toolsettings.js
+++ b/docs/html/class_intelli_toolsettings.js
@@ -2,8 +2,8 @@ var class_intelli_toolsettings =
[
[ "IntelliToolsettings", "class_intelli_toolsettings.html#a5560602964ab95380967d63ab7ec6e69", null ],
[ "~IntelliToolsettings", "class_intelli_toolsettings.html#a927e50594a459c952d06acd34c0eff56", null ],
- [ "getInnerAlpha", "class_intelli_toolsettings.html#a7d6ce2054ec4bcba7629dc2b514b6b5c", null ],
- [ "getLineWidth", "class_intelli_toolsettings.html#a68528dd3bad8f39ba19fa6b12a4e415a", null ],
+ [ "getInnerAlpha", "class_intelli_toolsettings.html#a96d267baa782a32784dbeb1b7cd68cc4", null ],
+ [ "getLineWidth", "class_intelli_toolsettings.html#abb3ee5a9c8a379167060799d275e65c3", null ],
[ "setInnerAlpha", "class_intelli_toolsettings.html#a9a61f3de61efeba2287f8b32941f4271", null ],
[ "setLineWidth", "class_intelli_toolsettings.html#a73fa94c85c6c2fdc1a33975a33304a6f", null ]
];
\ No newline at end of file
diff --git a/docs/html/functions.html b/docs/html/functions.html
index 5355e64..1027e10 100644
--- a/docs/html/functions.html
+++ b/docs/html/functions.html
@@ -205,7 +205,7 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
,
IntelliShapedImage
getFirstColor()
-: IntelliColorPicker
+: IntelliColorPicker
getHeightOfActive()
: PaintingArea
@@ -220,16 +220,16 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
: PaintingArea
getInnerAlpha()
-: IntelliToolsettings
+: IntelliToolsettings
getInt()
: IntelliInputDialog
getIsDrawing()
-: IntelliTool
+: IntelliTool
getLineWidth()
-: IntelliToolsettings
+: IntelliToolsettings
getMaxHeight()
: PaintingArea
@@ -251,10 +251,10 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
: PaintingArea
getSecondColor()
-: IntelliColorPicker
+: IntelliColorPicker
getTooltype()
-: IntelliTool
+: IntelliTool
getTypeOfImage()
: IntelliImage
@@ -340,7 +340,7 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
: IntelliTool
isFastRenderering()
-: IntelliRenderSettings
+: IntelliRenderSettings
diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html
index a39c59b..ef3b730 100644
--- a/docs/html/functions_func.html
+++ b/docs/html/functions_func.html
@@ -166,7 +166,7 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
,
IntelliShapedImage
getFirstColor()
-: IntelliColorPicker
+: IntelliColorPicker
getHeightOfActive()
: PaintingArea
@@ -181,16 +181,16 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
: PaintingArea
getInnerAlpha()
-: IntelliToolsettings
+: IntelliToolsettings
getInt()
: IntelliInputDialog
getIsDrawing()
-: IntelliTool
+: IntelliTool
getLineWidth()
-: IntelliToolsettings
+: IntelliToolsettings
getMaxHeight()
: PaintingArea
@@ -212,10 +212,10 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
: PaintingArea
getSecondColor()
-: IntelliColorPicker
+: IntelliColorPicker
getTooltype()
-: IntelliTool
+: IntelliTool
getTypeOfImage()
: IntelliImage
@@ -279,7 +279,7 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
: IntelliToolsettings
isFastRenderering()
-: IntelliRenderSettings
+: IntelliRenderSettings
diff --git a/docs/html/navtreeindex0.js b/docs/html/navtreeindex0.js
index 133c659..52578ef 100644
--- a/docs/html/navtreeindex0.js
+++ b/docs/html/navtreeindex0.js
@@ -81,10 +81,10 @@ var NAVTREEINDEX0 =
"class_intelli_color_picker.html":[1,0,0],
"class_intelli_color_picker.html#a0d1247bdd87add1396ea5d9acaad79ae":[1,0,0,0],
"class_intelli_color_picker.html#a40b975268a1f05249e8a49dde9a862ff":[1,0,0,1],
-"class_intelli_color_picker.html#a55568fbf5dc783f06284b7031ffe9415":[1,0,0,3],
"class_intelli_color_picker.html#a7e2ddbbbfbed383f06b24e5bf6b27ae8":[1,0,0,4],
"class_intelli_color_picker.html#a86bf4a940e4a0e465e30cbdf28748931":[1,0,0,5],
-"class_intelli_color_picker.html#aae2eb27b928fe9388b9398b0556303b7":[1,0,0,2],
+"class_intelli_color_picker.html#ab41abe8fb7e184db2c33e792f09792e0":[1,0,0,3],
+"class_intelli_color_picker.html#aeb08029a0c946ed0402c9c11a91965b1":[1,0,0,2],
"class_intelli_color_picker.html#aec499265ae28ce1b54be88222e74292e":[1,0,0,6],
"class_intelli_image.html":[1,0,1],
"class_intelli_image.html#a177403ab9585d4ba31984a644c54d310":[1,0,1,16],
@@ -130,8 +130,8 @@ var NAVTREEINDEX0 =
"class_intelli_raster_image.html#ae43393397b0141a8033fe34d3a1b1884":[1,0,4,4],
"class_intelli_raster_image.html#ae779b571372296f1922af818ba003413":[1,0,4,0],
"class_intelli_render_settings.html":[1,0,5],
+"class_intelli_render_settings.html#a38fd592c4948d2e47b95bb6fabc34073":[1,0,5,1],
"class_intelli_render_settings.html#a4a01de6e5e8e516a7eae51d6f1f66529":[1,0,5,0],
-"class_intelli_render_settings.html#a5d0eb9a5a3bf788dd87509386dea8dcd":[1,0,5,1],
"class_intelli_render_settings.html#a5ffb878b77e5d448ffe4eb03a8397ac2":[1,0,5,2],
"class_intelli_shaped_image.html":[1,0,6],
"class_intelli_shaped_image.html#a43d63d8a814852d377ee2030658fbab9":[1,0,6,1],
@@ -143,7 +143,6 @@ var NAVTREEINDEX0 =
"class_intelli_shaped_image.html#ae4518c7f5a105cc4f33fabb60c794a93":[1,0,6,5],
"class_intelli_shaped_image.html#aed0b31e0fa771104399d1f5ff39a0337":[1,0,6,2],
"class_intelli_tool.html":[1,0,7],
-"class_intelli_tool.html#a0020fad2e26315d5c4d96dbc95d1dceb":[1,0,7,3],
"class_intelli_tool.html#a08ef094271ce6248b42f888472463526":[1,0,7,1],
"class_intelli_tool.html#a144d469cc03584f501194529a1b53c77":[1,0,7,14],
"class_intelli_tool.html#a16189b00307c6d7e89f28198f54404b0":[1,0,7,9],
@@ -164,11 +163,12 @@ var NAVTREEINDEX0 =
"class_intelli_tool.html#a57fb1b27d364c9e3696eb928b75fa9f2":[1,0,7,2],
"class_intelli_tool.html#a631388999f36013628e13b9de87a6f7b":[1,0,7,12],
"class_intelli_tool.html#a906a2575c16c8a33cb2a5197f8d8cc5b":[1,0,7,6],
-"class_intelli_tool.html#aae2a11c5bae4973ed827c60e0c1352b1":[1,0,7,4],
"class_intelli_tool.html#ab4c2698a0f9f25fb6639ec760d2d0289":[1,0,7,13],
"class_intelli_tool.html#ac10e20414cd8855a2f9b103fb6408639":[1,0,7,7],
+"class_intelli_tool.html#adf5c06ad2b2c0d745fb68cf80e7e5694":[1,0,7,4],
"class_intelli_tool.html#ae2e0ac394611a361ab4ef2fe55c03fef":[1,0,7,15],
"class_intelli_tool.html#aedccdad01b2bc6ec84fad3582251ff5d":[1,0,7,11],
+"class_intelli_tool.html#af90f0965efbc5c25126691e998f39ca3":[1,0,7,3],
"class_intelli_tool_circle.html":[1,0,8],
"class_intelli_tool_circle.html#a29d7b9ed4960e6fe1f31ff620363e429":[1,0,8,5],
"class_intelli_tool_circle.html#a7a03b65b95d7b5d72e6a92c95f068954":[1,0,8,1],
@@ -234,11 +234,11 @@ var NAVTREEINDEX0 =
"class_intelli_tool_rectangle.html#ae03c307ccf66cbe3fd59e3657712368d":[1,0,14,2],
"class_intelli_toolsettings.html":[1,0,15],
"class_intelli_toolsettings.html#a5560602964ab95380967d63ab7ec6e69":[1,0,15,0],
-"class_intelli_toolsettings.html#a68528dd3bad8f39ba19fa6b12a4e415a":[1,0,15,3],
"class_intelli_toolsettings.html#a73fa94c85c6c2fdc1a33975a33304a6f":[1,0,15,5],
-"class_intelli_toolsettings.html#a7d6ce2054ec4bcba7629dc2b514b6b5c":[1,0,15,2],
"class_intelli_toolsettings.html#a927e50594a459c952d06acd34c0eff56":[1,0,15,1],
+"class_intelli_toolsettings.html#a96d267baa782a32784dbeb1b7cd68cc4":[1,0,15,2],
"class_intelli_toolsettings.html#a9a61f3de61efeba2287f8b32941f4271":[1,0,15,4],
+"class_intelli_toolsettings.html#abb3ee5a9c8a379167060799d275e65c3":[1,0,15,3],
"class_painting_area.html":[1,0,17],
"class_painting_area.html#a0b22e18069b524f3e75857d203baf256":[1,0,17,8],
"class_painting_area.html#a132535c4e16052c1472cf1b9f3e096ed":[1,0,17,39],
diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js
index 1ba5d99..d8db878 100644
--- a/docs/html/search/all_5.js
+++ b/docs/html/search/all_5.js
@@ -2,23 +2,23 @@ var searchData=
[
['getdeepcopy_32',['getDeepCopy',['../class_intelli_image.html#af6381067bdf565669f856bb589008ae9',1,'IntelliImage::getDeepCopy()'],['../class_intelli_raster_image.html#a8f901301b106504de3c27308ade897dc',1,'IntelliRasterImage::getDeepCopy()'],['../class_intelli_shaped_image.html#aed0b31e0fa771104399d1f5ff39a0337',1,'IntelliShapedImage::getDeepCopy()']]],
['getdisplayable_33',['getDisplayable',['../class_intelli_image.html#a21c7e65b59a26db45aac3880133ef21d',1,'IntelliImage::getDisplayable(const QSize &displaySize, int alpha)=0'],['../class_intelli_image.html#a9d4daf3c48c64695105689f61c21bae0',1,'IntelliImage::getDisplayable(int alpha=255)=0'],['../class_intelli_raster_image.html#ae43393397b0141a8033fe34d3a1b1884',1,'IntelliRasterImage::getDisplayable(const QSize &displaySize, int alpha) override'],['../class_intelli_raster_image.html#a612d79124f0e2c158a4f0abbe4b5f97f',1,'IntelliRasterImage::getDisplayable(int alpha=255) override'],['../class_intelli_shaped_image.html#a68cf374247c16f07fd84d50e4cd05630',1,'IntelliShapedImage::getDisplayable(const QSize &displaySize, int alpha=255) override'],['../class_intelli_shaped_image.html#ac6a99e1a96134073bceea252b37636cc',1,'IntelliShapedImage::getDisplayable(int alpha=255) override']]],
- ['getfirstcolor_34',['getFirstColor',['../class_intelli_color_picker.html#aae2eb27b928fe9388b9398b0556303b7',1,'IntelliColorPicker']]],
+ ['getfirstcolor_34',['getFirstColor',['../class_intelli_color_picker.html#aeb08029a0c946ed0402c9c11a91965b1',1,'IntelliColorPicker']]],
['getheightofactive_35',['getHeightOfActive',['../class_painting_area.html#ac576f58aad03b4dcd47611b6a4b9abb4',1,'PaintingArea']]],
['getimagedata_36',['getImageData',['../class_intelli_image.html#ad66fbe380ffe0e073a8cd760f8285fe3',1,'IntelliImage']]],
['getimagedataofactivelayer_37',['getImageDataOfActiveLayer',['../class_painting_area.html#a4f484ff3ca7ae202ab57a00f52551423',1,'PaintingArea']]],
['getimageofactivelayer_38',['getImageOfActiveLayer',['../class_painting_area.html#acab11ad35d07e9081203d8217d2c0855',1,'PaintingArea']]],
- ['getinneralpha_39',['getInnerAlpha',['../class_intelli_toolsettings.html#a7d6ce2054ec4bcba7629dc2b514b6b5c',1,'IntelliToolsettings']]],
+ ['getinneralpha_39',['getInnerAlpha',['../class_intelli_toolsettings.html#a96d267baa782a32784dbeb1b7cd68cc4',1,'IntelliToolsettings']]],
['getint_40',['getInt',['../class_intelli_input_dialog.html#a480ac2f5b8f7b9bc1cd7b30df84c2a62',1,'IntelliInputDialog']]],
- ['getisdrawing_41',['getIsDrawing',['../class_intelli_tool.html#a0020fad2e26315d5c4d96dbc95d1dceb',1,'IntelliTool']]],
- ['getlinewidth_42',['getLineWidth',['../class_intelli_toolsettings.html#a68528dd3bad8f39ba19fa6b12a4e415a',1,'IntelliToolsettings']]],
+ ['getisdrawing_41',['getIsDrawing',['../class_intelli_tool.html#af90f0965efbc5c25126691e998f39ca3',1,'IntelliTool']]],
+ ['getlinewidth_42',['getLineWidth',['../class_intelli_toolsettings.html#abb3ee5a9c8a379167060799d275e65c3',1,'IntelliToolsettings']]],
['getmaxheight_43',['getMaxHeight',['../class_painting_area.html#aa811d142df9239ae248679bd70ad6da7',1,'PaintingArea']]],
['getmaxwidth_44',['getMaxWidth',['../class_painting_area.html#aeb082c1cda3edb6b68d8ee45cf4822f8',1,'PaintingArea']]],
['getnumberofactivelayer_45',['getNumberOfActiveLayer',['../class_painting_area.html#a24280454ebb80db7feba2fd621513353',1,'PaintingArea']]],
['getpixelcolor_46',['getPixelColor',['../class_intelli_image.html#a4576ebb6d863321c816293d7b7f9fd3f',1,'IntelliImage']]],
['getpolygondata_47',['getPolygonData',['../class_intelli_image.html#aaf9f3e8db8666850024bee9aad9966ba',1,'IntelliImage::getPolygonData()'],['../class_intelli_shaped_image.html#ae4518c7f5a105cc4f33fabb60c794a93',1,'IntelliShapedImage::getPolygonData()']]],
['getpolygondataofreallayer_48',['getPolygonDataOfRealLayer',['../class_painting_area.html#a7ae21fd031ee1c04f92e042e86be0a90',1,'PaintingArea']]],
- ['getsecondcolor_49',['getSecondColor',['../class_intelli_color_picker.html#a55568fbf5dc783f06284b7031ffe9415',1,'IntelliColorPicker']]],
- ['gettooltype_50',['getTooltype',['../class_intelli_tool.html#aae2a11c5bae4973ed827c60e0c1352b1',1,'IntelliTool']]],
+ ['getsecondcolor_49',['getSecondColor',['../class_intelli_color_picker.html#ab41abe8fb7e184db2c33e792f09792e0',1,'IntelliColorPicker']]],
+ ['gettooltype_50',['getTooltype',['../class_intelli_tool.html#adf5c06ad2b2c0d745fb68cf80e7e5694',1,'IntelliTool']]],
['gettypeofimage_51',['getTypeOfImage',['../class_intelli_image.html#af6b09c8d1d6b54a7e8a4e7286f3e503f',1,'IntelliImage']]],
['gettypeofimagereallayer_52',['getTypeOfImageRealLayer',['../class_painting_area.html#ae92b27dfd09573c224d2ae1958d3bead',1,'PaintingArea']]],
['getwidthofactive_53',['getWidthOfActive',['../class_painting_area.html#a675ee91b26b1c58be6d833f279d81597',1,'PaintingArea']]]
diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js
index 29d4e96..42865e3 100644
--- a/docs/html/search/all_7.js
+++ b/docs/html/search/all_7.js
@@ -55,7 +55,7 @@ var searchData=
['intellitriangulation_2ecpp_108',['IntelliTriangulation.cpp',['../_intelli_triangulation_8cpp.html',1,'']]],
['intellitriangulation_2eh_109',['IntelliTriangulation.h',['../_intelli_triangulation_8h.html',1,'']]],
['isdrawing_110',['isDrawing',['../class_intelli_tool.html#a555aa8a74992327f740dd69b3bb0ccca',1,'IntelliTool']]],
- ['isfastrenderering_111',['isFastRenderering',['../class_intelli_render_settings.html#a5d0eb9a5a3bf788dd87509386dea8dcd',1,'IntelliRenderSettings']]],
+ ['isfastrenderering_111',['isFastRenderering',['../class_intelli_render_settings.html#a38fd592c4948d2e47b95bb6fabc34073',1,'IntelliRenderSettings']]],
['isinpolygon_112',['isInPolygon',['../namespace_intelli_triangulation.html#ac276696f29d141ed34614c1c3b1c040f',1,'IntelliTriangulation']]],
['isintriangle_113',['isInTriangle',['../namespace_intelli_triangulation.html#ac150fee67fd41a451bd2592f10e00197',1,'IntelliTriangulation']]]
];
diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js
index 46edeb3..b82be64 100644
--- a/docs/html/search/functions_3.js
+++ b/docs/html/search/functions_3.js
@@ -2,23 +2,23 @@ var searchData=
[
['getdeepcopy_270',['getDeepCopy',['../class_intelli_image.html#af6381067bdf565669f856bb589008ae9',1,'IntelliImage::getDeepCopy()'],['../class_intelli_raster_image.html#a8f901301b106504de3c27308ade897dc',1,'IntelliRasterImage::getDeepCopy()'],['../class_intelli_shaped_image.html#aed0b31e0fa771104399d1f5ff39a0337',1,'IntelliShapedImage::getDeepCopy()']]],
['getdisplayable_271',['getDisplayable',['../class_intelli_image.html#a21c7e65b59a26db45aac3880133ef21d',1,'IntelliImage::getDisplayable(const QSize &displaySize, int alpha)=0'],['../class_intelli_image.html#a9d4daf3c48c64695105689f61c21bae0',1,'IntelliImage::getDisplayable(int alpha=255)=0'],['../class_intelli_raster_image.html#ae43393397b0141a8033fe34d3a1b1884',1,'IntelliRasterImage::getDisplayable(const QSize &displaySize, int alpha) override'],['../class_intelli_raster_image.html#a612d79124f0e2c158a4f0abbe4b5f97f',1,'IntelliRasterImage::getDisplayable(int alpha=255) override'],['../class_intelli_shaped_image.html#a68cf374247c16f07fd84d50e4cd05630',1,'IntelliShapedImage::getDisplayable(const QSize &displaySize, int alpha=255) override'],['../class_intelli_shaped_image.html#ac6a99e1a96134073bceea252b37636cc',1,'IntelliShapedImage::getDisplayable(int alpha=255) override']]],
- ['getfirstcolor_272',['getFirstColor',['../class_intelli_color_picker.html#aae2eb27b928fe9388b9398b0556303b7',1,'IntelliColorPicker']]],
+ ['getfirstcolor_272',['getFirstColor',['../class_intelli_color_picker.html#aeb08029a0c946ed0402c9c11a91965b1',1,'IntelliColorPicker']]],
['getheightofactive_273',['getHeightOfActive',['../class_painting_area.html#ac576f58aad03b4dcd47611b6a4b9abb4',1,'PaintingArea']]],
['getimagedata_274',['getImageData',['../class_intelli_image.html#ad66fbe380ffe0e073a8cd760f8285fe3',1,'IntelliImage']]],
['getimagedataofactivelayer_275',['getImageDataOfActiveLayer',['../class_painting_area.html#a4f484ff3ca7ae202ab57a00f52551423',1,'PaintingArea']]],
['getimageofactivelayer_276',['getImageOfActiveLayer',['../class_painting_area.html#acab11ad35d07e9081203d8217d2c0855',1,'PaintingArea']]],
- ['getinneralpha_277',['getInnerAlpha',['../class_intelli_toolsettings.html#a7d6ce2054ec4bcba7629dc2b514b6b5c',1,'IntelliToolsettings']]],
+ ['getinneralpha_277',['getInnerAlpha',['../class_intelli_toolsettings.html#a96d267baa782a32784dbeb1b7cd68cc4',1,'IntelliToolsettings']]],
['getint_278',['getInt',['../class_intelli_input_dialog.html#a480ac2f5b8f7b9bc1cd7b30df84c2a62',1,'IntelliInputDialog']]],
- ['getisdrawing_279',['getIsDrawing',['../class_intelli_tool.html#a0020fad2e26315d5c4d96dbc95d1dceb',1,'IntelliTool']]],
- ['getlinewidth_280',['getLineWidth',['../class_intelli_toolsettings.html#a68528dd3bad8f39ba19fa6b12a4e415a',1,'IntelliToolsettings']]],
+ ['getisdrawing_279',['getIsDrawing',['../class_intelli_tool.html#af90f0965efbc5c25126691e998f39ca3',1,'IntelliTool']]],
+ ['getlinewidth_280',['getLineWidth',['../class_intelli_toolsettings.html#abb3ee5a9c8a379167060799d275e65c3',1,'IntelliToolsettings']]],
['getmaxheight_281',['getMaxHeight',['../class_painting_area.html#aa811d142df9239ae248679bd70ad6da7',1,'PaintingArea']]],
['getmaxwidth_282',['getMaxWidth',['../class_painting_area.html#aeb082c1cda3edb6b68d8ee45cf4822f8',1,'PaintingArea']]],
['getnumberofactivelayer_283',['getNumberOfActiveLayer',['../class_painting_area.html#a24280454ebb80db7feba2fd621513353',1,'PaintingArea']]],
['getpixelcolor_284',['getPixelColor',['../class_intelli_image.html#a4576ebb6d863321c816293d7b7f9fd3f',1,'IntelliImage']]],
['getpolygondata_285',['getPolygonData',['../class_intelli_image.html#aaf9f3e8db8666850024bee9aad9966ba',1,'IntelliImage::getPolygonData()'],['../class_intelli_shaped_image.html#ae4518c7f5a105cc4f33fabb60c794a93',1,'IntelliShapedImage::getPolygonData()']]],
['getpolygondataofreallayer_286',['getPolygonDataOfRealLayer',['../class_painting_area.html#a7ae21fd031ee1c04f92e042e86be0a90',1,'PaintingArea']]],
- ['getsecondcolor_287',['getSecondColor',['../class_intelli_color_picker.html#a55568fbf5dc783f06284b7031ffe9415',1,'IntelliColorPicker']]],
- ['gettooltype_288',['getTooltype',['../class_intelli_tool.html#aae2a11c5bae4973ed827c60e0c1352b1',1,'IntelliTool']]],
+ ['getsecondcolor_287',['getSecondColor',['../class_intelli_color_picker.html#ab41abe8fb7e184db2c33e792f09792e0',1,'IntelliColorPicker']]],
+ ['gettooltype_288',['getTooltype',['../class_intelli_tool.html#adf5c06ad2b2c0d745fb68cf80e7e5694',1,'IntelliTool']]],
['gettypeofimage_289',['getTypeOfImage',['../class_intelli_image.html#af6b09c8d1d6b54a7e8a4e7286f3e503f',1,'IntelliImage']]],
['gettypeofimagereallayer_290',['getTypeOfImageRealLayer',['../class_painting_area.html#ae92b27dfd09573c224d2ae1958d3bead',1,'PaintingArea']]],
['getwidthofactive_291',['getWidthOfActive',['../class_painting_area.html#a675ee91b26b1c58be6d833f279d81597',1,'PaintingArea']]]
diff --git a/docs/html/search/functions_4.js b/docs/html/search/functions_4.js
index ea9b7cc..085a772 100644
--- a/docs/html/search/functions_4.js
+++ b/docs/html/search/functions_4.js
@@ -16,7 +16,7 @@ var searchData=
['intellitoolpolygon_305',['IntelliToolPolygon',['../class_intelli_tool_polygon.html#a63b8c7514a87d4608533fbb557ee0db5',1,'IntelliToolPolygon']]],
['intellitoolrectangle_306',['IntelliToolRectangle',['../class_intelli_tool_rectangle.html#ada06457247d5b173888a9a520b31ec5c',1,'IntelliToolRectangle']]],
['intellitoolsettings_307',['IntelliToolsettings',['../class_intelli_toolsettings.html#a5560602964ab95380967d63ab7ec6e69',1,'IntelliToolsettings']]],
- ['isfastrenderering_308',['isFastRenderering',['../class_intelli_render_settings.html#a5d0eb9a5a3bf788dd87509386dea8dcd',1,'IntelliRenderSettings']]],
+ ['isfastrenderering_308',['isFastRenderering',['../class_intelli_render_settings.html#a38fd592c4948d2e47b95bb6fabc34073',1,'IntelliRenderSettings']]],
['isinpolygon_309',['isInPolygon',['../namespace_intelli_triangulation.html#ac276696f29d141ed34614c1c3b1c040f',1,'IntelliTriangulation']]],
['isintriangle_310',['isInTriangle',['../namespace_intelli_triangulation.html#ac150fee67fd41a451bd2592f10e00197',1,'IntelliTriangulation']]]
];
diff --git a/docs/html/tst__unittest_8cpp_source.html b/docs/html/tst__unittest_8cpp_source.html
index 5189812..c3292b4 100644
--- a/docs/html/tst__unittest_8cpp_source.html
+++ b/docs/html/tst__unittest_8cpp_source.html
@@ -773,8 +773,8 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
-
-
+
+
@@ -817,8 +817,8 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
-
-
+
+
@@ -860,8 +860,8 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
-
-
+
+
@@ -902,8 +902,8 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
-
-
+
+
@@ -944,8 +944,8 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
-
-
+
+
@@ -1013,13 +1013,13 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
-
-
-
-
+
+
+
+
-
+
937 QVERIFY(area->layerBundle[0].image->getPixelColor(test[0])==QColor(255,0,0,255));
938 QVERIFY(area->layerBundle[0].image->getPixelColor(test[1])==QColor(255,0,0,255));
939 QVERIFY(area->layerBundle[0].image->getPixelColor(test[2])==QColor(255,0,0,255));
@@ -1100,9 +1100,9 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
-
-
-
+
+
+
@@ -1784,6 +1784,7 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
+
QColor getFirstColor() const
A function to read the primary selected color.
void createRectangleTool()
@@ -1802,7 +1803,6 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
void setSecondColor(QColor Color)
A function to set the secondary color.
The IntelliShapedImage manages a Shapedimage.
-
QColor getSecondColor()
A function to read the secondary selected color.
@@ -1810,6 +1810,7 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
+
QColor getSecondColor() const
A function to read the secondary selected color.
@@ -1824,7 +1825,6 @@ $(document).ready(function(){initNavTree('tst__unittest_8cpp_source.html',''); i
void moveActiveLayer(int idx)
The moveActiveLayer moves the active layer to a specific position in the layer stack.
IntelliColorPicker colorPicker
-
QColor getFirstColor()
A function to read the primary selected color.
void createFloodFillTool()
diff --git a/knownBugs.txt b/knownBugs.txt
new file mode 100644
index 0000000..8314056
--- /dev/null
+++ b/knownBugs.txt
@@ -0,0 +1 @@
+history tool doesnt load polygon data on undo iff project was loaded
\ No newline at end of file
diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp
index 5237ee0..44cdf63 100644
--- a/src/GUI/IntelliPhotoGui.cpp
+++ b/src/GUI/IntelliPhotoGui.cpp
@@ -3,6 +3,11 @@
#include "IntelliPhotoGui.h"
#include "Layer/PaintingArea.h"
+#include
+#include
+#include
+#include
+
// IntelliPhotoGui constructor
IntelliPhotoGui::IntelliPhotoGui(){
// create Gui elements and lay them out
@@ -15,8 +20,7 @@ IntelliPhotoGui::IntelliPhotoGui(){
setIntelliStyle();
// Size the app
resize(600,600);
- showMaximized();
- setDefaultToolValue();
+ setDefaultValues();
}
// User tried to close the app
@@ -47,10 +51,28 @@ void IntelliPhotoGui::slotOpen(){
// If we have a file name load the image and place
// it in the paintingArea
if (!fileName.isEmpty()) {
- paintingArea->open(fileName);
- UpdateGui();
- }
- }
+ bool rightFileType =true;
+ if(fileName.size()>=4){
+ QString endung(".idf");
+ int length = fileName.size();
+ for(int i=0; i<4; i++){
+ if(endung[i]!=fileName[length-4+i]){
+ rightFileType = false;
+ break;
+ }
+ }
+ }
+
+ if(rightFileType){
+ IntelliDatamanager::loadProject(paintingArea,fileName);
+ UpdateGui();
+
+ }
+ else{
+ paintingArea->open(fileName);
+ }
+ }
+ }
}
// Called when the user clicks Save As in the menu
@@ -79,7 +101,7 @@ void IntelliPhotoGui::slotCreateNewRasterLayer(){
// Create New Layer
if (ok1&&ok2) {
- paintingArea->addLayer(width,height,0,0,IntelliImage::ImageType::RASTERIMAGE);
+ paintingArea->addLayer(width,height,0,0,255,ImageType::RASTERIMAGE);
UpdateGui();
}
}
@@ -98,7 +120,7 @@ void IntelliPhotoGui::slotCreateNewShapedLayer(){
// Create New Layer
if (ok1&&ok2) {
- paintingArea->addLayer(width, height, 0, 0, IntelliImage::ImageType::SHAPEDIMAGE);
+ paintingArea->addLayer(width, height, 0, 0,255, ImageType::SHAPEDIMAGE);
UpdateGui();
}
}
@@ -115,6 +137,8 @@ void IntelliPhotoGui::slotChangeDim(){
int height = IntelliInputDialog::getInt("New Canvas Size", "Height:", 600, 1, 50000, 1, &ok2);
+
+
// Change dimension
if (ok1&&ok2) {
paintingArea->setLayerDimensions(width,height);
@@ -324,6 +348,14 @@ void IntelliPhotoGui::slotSetInnerAlpha(){
}
}
+void IntelliPhotoGui::slotGoBack(){
+ paintingArea->historyGoBack();
+}
+
+void IntelliPhotoGui::slotGoForward(){
+ paintingArea->historyGoForward();
+}
+
// Define menu actions that call functions
void IntelliPhotoGui::createActions(){
// Get a list of the supported file formats
@@ -353,6 +385,14 @@ void IntelliPhotoGui::createActions(){
actionSaveAs.append(pngSaveAction);
pngSaveAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
+ QAction*projectSaveAction = new QAction("Projekt", this);
+ projectSaveAction->setData("idf");
+ // When clicked call IntelliPhotoGui::save()
+ connect(projectSaveAction, SIGNAL(triggered()), this, SLOT(slotSave()));
+ // Attach each PNG in save Menu
+ actionSaveAs.append(projectSaveAction);
+ projectSaveAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S));
+
// Create exit action and tie to IntelliPhotoGui::close()
actionExit = new QAction(tr("&Exit"), this);
actionExit->setShortcuts(QKeySequence::Quit);
@@ -522,6 +562,14 @@ void IntelliPhotoGui::createActions(){
actionSetInnerAlpha = new QAction(tr("&Set Inner Alpha"),this);
actionSetInnerAlpha->setShortcut(QKeySequence(Qt::ALT + Qt::Key_A));
connect(actionSetInnerAlpha, SIGNAL(triggered()), this, SLOT(slotSetInnerAlpha()));
+
+ actionGoBack = new QAction(tr("&Go back"),this);
+ actionGoBack->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Z));
+ connect(actionGoBack, SIGNAL(triggered()), this, SLOT(slotGoBack()));
+
+ actionGoForward = new QAction(tr("&Go forward"),this);
+ actionGoForward->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Y));
+ connect(actionGoForward, SIGNAL(triggered()), this, SLOT(slotGoForward()));
}
// Create the menubar
@@ -547,6 +595,7 @@ void IntelliPhotoGui::createMenus(){
layerCreationMenu = new QMenu(tr("&Create new Layer"), this);
layerCreationMenu->addAction(actionCreateNewRasterLayer);
layerCreationMenu->addAction(actionCreateNewShapedLayer);
+
// Attach all actions to Layer
layerMenu = new QMenu(tr("&Layer"), this);
layerMenu->addMenu(layerCreationMenu);
@@ -594,6 +643,8 @@ void IntelliPhotoGui::createMenus(){
// Attach all actions to Options
optionMenu = new QMenu(tr("&Options"), this);
+ optionMenu->addAction(actionGoBack);
+ optionMenu->addAction(actionGoForward);
optionMenu->addMenu(layerMenu);
optionMenu->addMenu(toolMenu);
optionMenu->addSeparator();
@@ -623,7 +674,7 @@ void IntelliPhotoGui::createGui(){
// create Gui elements
// get and set max width and height
paintingArea = new PaintingArea(1280, 720);
- paintingArea->DummyGui = this;
+ paintingArea->guiReference = this;
preview = QPixmap(":/Icons/Buttons/icons/circle-tool.svg");
CircleButton = new QPushButton();
@@ -737,8 +788,14 @@ void IntelliPhotoGui::createGui(){
QString String = QString("%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height());
dimCanvas->setText(String);
+ ScrollArea = new QScrollArea(this);
+ ScrollArea->setBackgroundRole(QPalette::Dark);
+ ScrollArea->setWidget(paintingArea);
+ ScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+ ScrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+
// set gui elements
- mainLayout->addWidget(paintingArea,1,1,20,1);
+ mainLayout->addWidget(ScrollArea,1,1,20,1);
mainLayout->addWidget(CircleButton,1,2,1,1);
mainLayout->addWidget(FloodFillButton,1,3,1,1);
mainLayout->addWidget(LineButton,2,2,1,1);
@@ -758,6 +815,7 @@ void IntelliPhotoGui::createGui(){
mainLayout->addWidget(dimActive,13,2,1,2);
mainLayout->addWidget(dimCanvas,14,2,1,2);
mainLayout->setHorizontalSpacing(0);
+
}
void IntelliPhotoGui::setIntelliStyle(){
@@ -774,28 +832,26 @@ void IntelliPhotoGui::setIntelliStyle(){
bool IntelliPhotoGui::maybeSave(){
// Check for changes since last save
+#ifdef QT_NO_DEBUG
+ QMessageBox::StandardButton ret;
- // TODO insert variable for modified status here to make an save exit message
- if (false) {
- QMessageBox::StandardButton ret;
+ // Painting is the title of the window
+ // Add text and the buttons
+ ret = QMessageBox::warning(this, tr("Painting"),
+ tr("The image has been modified.\n"
+ "Do you want to save your changes?"),
+ QMessageBox::Save | QMessageBox::Discard
+ | QMessageBox::Cancel);
- // Painting is the title of the window
- // Add text and the buttons
- ret = QMessageBox::warning(this, tr("Painting"),
- tr("The image has been modified.\n"
- "Do you want to save your changes?"),
- QMessageBox::Save | QMessageBox::Discard
- | QMessageBox::Cancel);
+ // If save button clicked call for file to be saved
+ if (ret == QMessageBox::Save) {
+ return saveFile("png");
- // If save button clicked call for file to be saved
- if (ret == QMessageBox::Save) {
- return saveFile("png");
-
- // If cancel do nothing
- } else if (ret == QMessageBox::Cancel) {
- return false;
- }
+ // If cancel do nothing
+ } else if (ret == QMessageBox::Cancel) {
+ return false;
}
+#endif
return true;
}
@@ -816,11 +872,15 @@ bool IntelliPhotoGui::saveFile(const QByteArray &fileFormat){
return false;
} else {
// Call for the file to be saved
+ if(fileFormat == "idf"){
+ return IntelliDatamanager::saveProject(paintingArea, fileName);
+
+ }
return paintingArea->save(fileName, fileFormat.constData());
}
}
-void IntelliPhotoGui::setDefaultToolValue(){
+void IntelliPhotoGui::setDefaultValues(){
slotEnterPressed();
}
@@ -845,7 +905,9 @@ void IntelliPhotoGui::UpdateGui(){
tmp.fill(Qt::transparent);
preview = preview.fromImage(tmp);
}
- ActiveLayerImageLabel->setPixmap(preview.scaled(Buttonsize * 2));
+
+
+ ActiveLayerImageLabel->setPixmap(preview.scaled(Buttonsize * 2));
string = QString("background-color: %1").arg(paintingArea->colorPicker.getFirstColor().name());
FirstColorButton->setStyleSheet(string);
@@ -856,7 +918,9 @@ void IntelliPhotoGui::UpdateGui(){
dimCanvas->setText(string);
if(paintingArea->layerBundle.size() != 0) {
- string = QString("%1x%2").arg(paintingArea->layerBundle[static_cast(paintingArea->getNumberOfActiveLayer())].width).arg(paintingArea->layerBundle[static_cast(paintingArea->getNumberOfActiveLayer())].height);
+ string = QString("%1x%2").arg(paintingArea->layerBundle[static_cast
+ (paintingArea->getNumberOfActiveLayer())].width).arg(paintingArea->layerBundle[static_cast
+ (paintingArea->getNumberOfActiveLayer())].height);
dimActive->setText(string);
}
else{
diff --git a/src/GUI/IntelliPhotoGui.h b/src/GUI/IntelliPhotoGui.h
index 8d164a4..8c1b000 100644
--- a/src/GUI/IntelliPhotoGui.h
+++ b/src/GUI/IntelliPhotoGui.h
@@ -14,7 +14,9 @@
#include
#include
#include
+#include
#include "IntelliInputDialog.h"
+#include "IntelliHelper/IntelliDatamanager.h"
//for unit testing
class UnitTest;
@@ -95,11 +97,15 @@ void slotSetInnerAlpha();
void slotResetTools();
+void slotGoBack();
+void slotGoForward();
+
private:
+
+//setup functions for gui
void createActions();
void createMenus();
void createGui();
-// Set the style of the GUI
void setIntelliStyle();
// Will check if changes have occurred since last save
@@ -107,13 +113,19 @@ bool maybeSave();
// Opens the Save dialog and saves
bool saveFile(const QByteArray &fileFormat);
-void setDefaultToolValue();
+//basic to set tool values to begin
+void setDefaultValues();
// What we'll draw on
PaintingArea* paintingArea;
-const QSize Buttonsize = QSize(35,35);
+//used to display a preview of the active layer
QPixmap preview;
+
+//size of all buttons
+const QSize Buttonsize = QSize(35,35);
+
+//buttons used for gui
QPushButton* CircleButton;
QPushButton* FloodFillButton;
QPushButton* LineButton;
@@ -121,35 +133,42 @@ QPushButton* PenButton;
QPushButton* PlainButton;
QPushButton* PolygonButton;
QPushButton* RectangleButton;
-QLabel* WidthLine;
-QLabel* innerAlphaLine;
-QLineEdit* EditLineWidth;
-QLineEdit* EditLineInnerAlpha;
-QIntValidator* ValidatorLineWidth;
-QIntValidator* ValidatorInnerAlpha;
-
QPushButton* FirstColorButton;
QPushButton* SecondColorButton;
QPushButton* SwitchColorButton;
-
-QLabel* ActiveLayerLine;
-QLabel* ActiveLayerImageLabel;
-
QPushButton* dimActive;
QPushButton* dimCanvas;
+//labels used for gui
+QLabel* WidthLine;
+QLabel* innerAlphaLine;
+QLabel* ActiveLayerLine;
+QLabel* ActiveLayerImageLabel;
+
+//scroll area to display canvas
+QScrollArea* ScrollArea;
+
+//line edits used for gui
+QLineEdit* EditLineWidth;
+QLineEdit* EditLineInnerAlpha;
+
+//int validator used for gui
+QIntValidator* ValidatorLineWidth;
+QIntValidator* ValidatorInnerAlpha;
+
+
// The menu widgets
-QMenu*saveAsMenu;
-QMenu*fileMenu;
-QMenu*renderMenu;
-QMenu*optionMenu;
-QMenu*layerCreationMenu;
-QMenu*layerMenu;
-QMenu*colorMenu;
-QMenu*toolCreationMenu;
-QMenu*toolSettingsMenu;
-QMenu*toolMenu;
-QMenu*helpMenu;
+QMenu* saveAsMenu;
+QMenu* fileMenu;
+QMenu* renderMenu;
+QMenu* optionMenu;
+QMenu* layerCreationMenu;
+QMenu* layerMenu;
+QMenu* colorMenu;
+QMenu* toolCreationMenu;
+QMenu* toolSettingsMenu;
+QMenu* toolMenu;
+QMenu* helpMenu;
// All the actions that can occur
// meta image actions (need further modularisation)
@@ -175,7 +194,9 @@ QAction* actionCreatePolygonTool;
QAction* actionCreateFloodFillTool;
// dimension actions
-QAction*actionChangeDim;
+QAction* actionChangeDim;
+QAction* actionSetWidth;
+QAction* actionSetInnerAlpha;
// dialog actions
QAction* actionAboutDialog;
@@ -195,11 +216,14 @@ QAction* actionMovePositionRight;
QAction* actionMoveLayerUp;
QAction* actionMoveLayerDown;
-// Actions tied to specific file formats
+// actions tied to specific file formats
QList actionSaveAs;
-QAction* actionSetWidth;
-QAction* actionSetInnerAlpha;
+
+
+// history actions
+QAction* actionGoBack;
+QAction* actionGoForward;
// main GUI elements
QWidget* centralGuiWidget;
diff --git a/src/Image/IntelliImage.cpp b/src/Image/IntelliImage.cpp
index 0017877..446997d 100644
--- a/src/Image/IntelliImage.cpp
+++ b/src/Image/IntelliImage.cpp
@@ -2,7 +2,7 @@
#include
#include
-IntelliImage::IntelliImage(int width, int height, bool fastRendererOn)
+IntelliImage:: IntelliImage(int width, int height, bool fastRendererOn)
: imageData(QSize(width, height), fastRendererOn ? QImage::Format_Indexed8 : QImage::Format_ARGB32){
if(fastRendererOn) {
imageData = imageData.convertToFormat(QImage::Format_ARGB32);
@@ -15,6 +15,7 @@ IntelliImage::IntelliImage(int width, int height, bool fastRendererOn)
}
+
IntelliImage::~IntelliImage(){
}
@@ -158,3 +159,15 @@ void IntelliImage::updateRendererSetting(bool fastRendererOn){
this->imageData = imageData.convertToFormat(QImage::Format_ARGB32);
}
}
+
+int IntelliImage::getWidth() const{
+ return imageData.width();
+}
+
+int IntelliImage::getHeight() const{
+ return imageData.height();
+}
+
+bool IntelliImage::isFastRendering() const{
+ return this->fastRenderering;
+}
diff --git a/src/Image/IntelliImage.h b/src/Image/IntelliImage.h
index 5c19186..a767c54 100644
--- a/src/Image/IntelliImage.h
+++ b/src/Image/IntelliImage.h
@@ -16,6 +16,14 @@ class UnitTest;
class IntelliTool;
+/*!
+ * \brief The Types, which an Image can be.
+ */
+enum class ImageType {
+ RASTERIMAGE,
+ SHAPEDIMAGE
+};
+
/*!
* \brief An abstract class which manages the basic IntelliImage operations.
*/
@@ -24,14 +32,6 @@ friend UnitTest;
friend IntelliTool;
public:
-/*!
- * \brief The Types, which an Image can be.
- */
-enum class ImageType {
- RASTERIMAGE,
- SHAPEDIMAGE
-};
-
protected:
void resizeImage(QImage*image, const QSize &newSize);
@@ -59,6 +59,7 @@ public:
*/
IntelliImage(int width, int height, bool fastRendererOn);
+
/*!
* \brief An Abstract Destructor.
*/
@@ -170,6 +171,12 @@ virtual QImage getImageData();
*/
virtual void setImageData(const QImage& newData);
+virtual int getWidth() const;
+
+virtual int getHeight() const;
+
+virtual bool isFastRendering() const;
+
};
#endif
diff --git a/src/Image/IntelliRasterImage.cpp b/src/Image/IntelliRasterImage.cpp
index 3106e36..de9412f 100644
--- a/src/Image/IntelliRasterImage.cpp
+++ b/src/Image/IntelliRasterImage.cpp
@@ -5,18 +5,28 @@
IntelliRasterImage::IntelliRasterImage(int width, int height, bool fastRendererOn)
: IntelliImage(width, height, fastRendererOn){
- TypeOfImage = IntelliImage::ImageType::RASTERIMAGE;
+ TypeOfImage = ImageType::RASTERIMAGE;
this->fastRenderering = fastRendererOn;
}
+
+IntelliRasterImage* IntelliRasterImage::copy(const IntelliRasterImage& image){
+ this->TypeOfImage = ImageType::RASTERIMAGE;
+ IntelliRasterImage* raster = new IntelliRasterImage(imageData.width(), imageData.height(), this->fastRenderering);
+ raster->imageData.copy(0,0,image.getWidth(),image.getWidth());
+ return raster;
+}
+
+
+
IntelliRasterImage::~IntelliRasterImage(){
}
IntelliImage* IntelliRasterImage::getDeepCopy(){
- IntelliRasterImage* raster = new IntelliRasterImage(imageData.width(), imageData.height(), false);
+ IntelliRasterImage* raster = new IntelliRasterImage(imageData.width(), imageData.height(), this->fastRenderering);
raster->imageData.fill(Qt::transparent);
- raster->TypeOfImage = IntelliImage::ImageType::RASTERIMAGE;
+ raster->TypeOfImage = ImageType::RASTERIMAGE;
return raster;
}
@@ -49,3 +59,7 @@ QImage IntelliRasterImage::getDisplayable(const QSize& displaySize, int alpha){
void IntelliRasterImage::setPolygon(const std::vector& polygonData){
return;
}
+
+std::vector IntelliRasterImage::getPolygon(){
+ return std::vector();
+}
diff --git a/src/Image/IntelliRasterImage.h b/src/Image/IntelliRasterImage.h
index a67472a..5b224dc 100644
--- a/src/Image/IntelliRasterImage.h
+++ b/src/Image/IntelliRasterImage.h
@@ -26,6 +26,8 @@ public:
*/
IntelliRasterImage(int width, int height, bool fastRendererOn);
+IntelliRasterImage* copy(const IntelliRasterImage& image);
+
/*!
* \brief An Destructor.
*/
@@ -57,6 +59,12 @@ virtual IntelliImage* getDeepCopy() override;
* \param polygonData - The Vertices of the Polygon. Nothing happens.
*/
virtual void setPolygon(const std::vector& polygonData) override;
+
+/*!
+ * \brief getPolygon
+ * \return returns the points of the polygon
+ */
+virtual std::vector getPolygon();
};
#endif
diff --git a/src/Image/IntelliShapedImage.cpp b/src/Image/IntelliShapedImage.cpp
index 14c7b71..6aca975 100644
--- a/src/Image/IntelliShapedImage.cpp
+++ b/src/Image/IntelliShapedImage.cpp
@@ -6,10 +6,17 @@
IntelliShapedImage::IntelliShapedImage(int width, int height, bool fastRendererOn)
: IntelliRasterImage(width, height, fastRendererOn){
- TypeOfImage = IntelliImage::ImageType::SHAPEDIMAGE;
+ TypeOfImage = ImageType::SHAPEDIMAGE;
this->fastRenderering = fastRendererOn;
}
+IntelliShapedImage* IntelliShapedImage::copy(const IntelliShapedImage& image){
+ this->TypeOfImage = ImageType::SHAPEDIMAGE;
+ IntelliShapedImage* shaped = new IntelliShapedImage(imageData.width(), imageData.height(), this->fastRenderering);
+ shaped->imageData.copy(0,0,image.getWidth(),image.getWidth());
+ return shaped;
+}
+
IntelliShapedImage::~IntelliShapedImage(){
}
@@ -19,10 +26,10 @@ QImage IntelliShapedImage::getDisplayable(int alpha){
}
IntelliImage* IntelliShapedImage::getDeepCopy(){
- IntelliShapedImage* shaped = new IntelliShapedImage(imageData.width(), imageData.height(), false);
+ IntelliShapedImage* shaped = new IntelliShapedImage(imageData.width(), imageData.height(), this->fastRenderering);
shaped->setPolygon(this->polygonData);
shaped->imageData.fill(Qt::transparent);
- shaped->TypeOfImage = IntelliImage::ImageType::SHAPEDIMAGE;
+ shaped->TypeOfImage = ImageType::SHAPEDIMAGE;
return shaped;
}
@@ -111,3 +118,7 @@ void IntelliShapedImage::setPolygon(const std::vector& polygonData){
calculateVisiblity();
return;
}
+
+std::vector IntelliShapedImage::getPolygon(){
+ return polygonData;
+}
diff --git a/src/Image/IntelliShapedImage.h b/src/Image/IntelliShapedImage.h
index 32c4c9f..6f236ab 100644
--- a/src/Image/IntelliShapedImage.h
+++ b/src/Image/IntelliShapedImage.h
@@ -38,6 +38,7 @@ public:
*/
IntelliShapedImage(int width, int height, bool fastRendererOn);
+IntelliShapedImage* copy(const IntelliShapedImage& image);
/*!
* \brief An Destructor.
*/
@@ -77,6 +78,14 @@ virtual std::vector getPolygonData() override {
* \param polygonData - The Vertices of the Polygon. Just Planar Polygons are allowed.
*/
virtual void setPolygon(const std::vector& polygonData) override;
+
+
+/*!
+ * \brief getPolygon
+ * \return returns the data of the polygon as points
+ */
+virtual std::vector getPolygon() override;
};
+
#endif
diff --git a/src/IntelliHelper/IntelliColorPicker.cpp b/src/IntelliHelper/IntelliColorPicker.cpp
index b13ca02..3cf60db 100644
--- a/src/IntelliHelper/IntelliColorPicker.cpp
+++ b/src/IntelliHelper/IntelliColorPicker.cpp
@@ -12,11 +12,11 @@ void IntelliColorPicker::swapColors(){
std::swap(firstColor, secondColor);
}
-QColor IntelliColorPicker::getFirstColor(){
+QColor IntelliColorPicker::getFirstColor() const {
return this->firstColor;
}
-QColor IntelliColorPicker::getSecondColor(){
+QColor IntelliColorPicker::getSecondColor() const {
return this->secondColor;
}
diff --git a/src/IntelliHelper/IntelliColorPicker.h b/src/IntelliHelper/IntelliColorPicker.h
index 401d74d..06bd89f 100644
--- a/src/IntelliHelper/IntelliColorPicker.h
+++ b/src/IntelliHelper/IntelliColorPicker.h
@@ -33,13 +33,13 @@ void swapColors();
* \brief A function to read the primary selected color.
* \return Returns the primary color.
*/
-QColor getFirstColor();
+QColor getFirstColor() const;
/*!
* \brief A function to read the secondary selected color.
* \return Returns the secondary color.
*/
-QColor getSecondColor();
+QColor getSecondColor() const;
/*!
* \brief A function to set the primary color.
diff --git a/src/IntelliHelper/IntelliDatamanager.cpp b/src/IntelliHelper/IntelliDatamanager.cpp
new file mode 100644
index 0000000..bce95f6
--- /dev/null
+++ b/src/IntelliHelper/IntelliDatamanager.cpp
@@ -0,0 +1,101 @@
+#include "IntelliDatamanager.h"
+#include "Layer/PaintingArea.h"
+
+bool IntelliDatamanager::saveProject(PaintingArea* Canvas, QString filePath){
+ QFile openFile(filePath);
+
+ if(openFile.open(QIODevice::WriteOnly)){
+
+ QTextStream out(&openFile);
+ std::vector* layerBundle = Canvas->getLayerBundle();
+ size_t numberOfLayers = layerBundle->size();
+ out << 7 << endl; //version tag
+ out << Canvas->getRenderSettings() << " ";
+ out << Canvas->getMaxWidth() << " " << Canvas->getMaxHeight() << endl; //dimensions of canvas
+ out << numberOfLayers << endl; //number of layers
+ for(size_t i = 0; iat(i).width;
+ int height = layerBundle->at(i).height;
+ out << width << endl; //width
+ out << height << endl; //height
+ out << layerBundle->at(i).widthOffset << endl; //widthOffset
+ out << layerBundle->at(i).heightOffset << endl; //HeightOffset
+ out << layerBundle->at(i).alpha << endl; //alpha of layer
+ if(layerBundle->at(i).image->getTypeOfImage() == ImageType::RASTERIMAGE){
+ out << 0 << " ";
+ }else{
+ out << 1 << " ";
+ }
+ std::vector points = layerBundle->at(i).image->getPolygonData();
+ out << points.size() << " ";
+ for(size_t j = 0; jat(i).image->getImageData().pixelColor(j,k);
+ out << pixColor.red() << " " << pixColor.green() << " " << pixColor.blue() << " " << pixColor.alpha() << " ";
+ }
+ }
+
+ }
+ out << "\nFormat designed and approved by IntelliPhoto Team 7. All rigths reserved.";
+ openFile.close();
+ return true;
+ }
+
+ return false;
+}
+
+bool IntelliDatamanager::loadProject(PaintingArea* Canvas, QString filePath){
+ QFile openFile(filePath);
+ Canvas->deleteAllLayers();
+ if(openFile.open(QIODevice::ReadOnly)){
+ QTextStream in(&openFile);
+
+ float version;
+ int rendersetting;
+ int widthCanvas, heightCanvas, numberOffLayers;
+ in >> version;
+ in >> rendersetting;
+ in >> widthCanvas >> heightCanvas;
+ in >> numberOffLayers;
+
+ Canvas->setLayerDimensions(widthCanvas, heightCanvas);
+ for(int i=0; i> width >> height >> widthOffset >> heightOffset >> alpha;
+
+ int typeFlag;
+ size_t numberOfPoints;
+ std::vector polyPoints;
+
+ in >> typeFlag >> numberOfPoints;
+ if(typeFlag==0){
+ Canvas->addLayer(width, height, widthOffset, heightOffset, alpha, ImageType::RASTERIMAGE);
+ }else{
+ Canvas->addLayer(width, height, widthOffset, heightOffset, alpha, ImageType::SHAPEDIMAGE);
+ }
+ polyPoints.reserve(numberOfPoints);
+ for(size_t j=0; j> x >> y;
+ polyPoints.push_back(QPoint(x,y));
+ }
+ Canvas->setPolygonDataToActive(polyPoints);
+
+ for(int j=0; j> red >> green >> blue >> alpha;
+ Canvas->setPixelToActive(QColor(red, green, blue, alpha), QPoint(j, k));
+ }
+ }
+ }
+ Canvas->setRenderSettings(static_cast(rendersetting));
+ openFile.close();
+ return true;
+ }
+
+ return false;
+}
diff --git a/src/IntelliHelper/IntelliDatamanager.h b/src/IntelliHelper/IntelliDatamanager.h
new file mode 100644
index 0000000..eb121d9
--- /dev/null
+++ b/src/IntelliHelper/IntelliDatamanager.h
@@ -0,0 +1,16 @@
+#ifndef INTELLIDATAMANAGER_H
+#define INTELLIDATAMANAGER_H
+
+#include
+#include
+
+class PaintingArea;
+
+namespace IntelliDatamanager{
+
+ bool loadProject(PaintingArea* Canvas, QString filePath = "unnamed.idf");
+ bool saveProject(PaintingArea* Canvas, QString filePath = "unnamed.idf");
+
+}
+
+#endif // INTELLIDATAMANAGER_H
diff --git a/src/IntelliHelper/IntelliRenderSettings.cpp b/src/IntelliHelper/IntelliRenderSettings.cpp
index c1f6b19..88c3163 100644
--- a/src/IntelliHelper/IntelliRenderSettings.cpp
+++ b/src/IntelliHelper/IntelliRenderSettings.cpp
@@ -9,6 +9,6 @@ void IntelliRenderSettings::setFastRendering(bool Updatedsetting){
this->fastRenderering = Updatedsetting;
}
-bool IntelliRenderSettings::isFastRenderering(){
+bool IntelliRenderSettings::isFastRenderering() const {
return fastRenderering;
}
diff --git a/src/IntelliHelper/IntelliRenderSettings.h b/src/IntelliHelper/IntelliRenderSettings.h
index b8b1a87..296c186 100644
--- a/src/IntelliHelper/IntelliRenderSettings.h
+++ b/src/IntelliHelper/IntelliRenderSettings.h
@@ -20,7 +20,7 @@ void setFastRendering(bool Updatedsetting);
* \brief The getfastRenderer gets the value of the flag for the fastRenderer setting.
* \return Returns true if fastRenderer is active else false
*/
-bool isFastRenderering();
+bool isFastRenderering() const;
private:
bool fastRenderering = true;
diff --git a/src/IntelliHelper/IntelliToolsettings.cpp b/src/IntelliHelper/IntelliToolsettings.cpp
index c6a7cfc..528e3e0 100644
--- a/src/IntelliHelper/IntelliToolsettings.cpp
+++ b/src/IntelliHelper/IntelliToolsettings.cpp
@@ -11,7 +11,7 @@ IntelliToolsettings::~IntelliToolsettings(){
}
-int IntelliToolsettings::getLineWidth(){
+int IntelliToolsettings::getLineWidth() const {
return lineWidth;
}
@@ -25,7 +25,7 @@ void IntelliToolsettings::setLineWidth(int LineWidth){
lineWidth = LineWidth;
}
-int IntelliToolsettings::getInnerAlpha(){
+int IntelliToolsettings::getInnerAlpha() const {
return this->innerAlpha;
}
diff --git a/src/IntelliHelper/IntelliToolsettings.h b/src/IntelliHelper/IntelliToolsettings.h
index 1b0f90c..c2fd2bb 100644
--- a/src/IntelliHelper/IntelliToolsettings.h
+++ b/src/IntelliHelper/IntelliToolsettings.h
@@ -10,10 +10,10 @@ public:
IntelliToolsettings();
virtual ~IntelliToolsettings();
-int getLineWidth();
+int getLineWidth() const;
void setLineWidth(int LineWidth);
-int getInnerAlpha();
+int getInnerAlpha() const;
void setInnerAlpha(int innerAlpha);
private:
diff --git a/src/IntelliPhoto.pro b/src/IntelliPhoto.pro
index faf6c86..2b1d4d5 100755
--- a/src/IntelliPhoto.pro
+++ b/src/IntelliPhoto.pro
@@ -22,6 +22,7 @@ SOURCES += \
Image/IntelliRasterImage.cpp \
Image/IntelliShapedImage.cpp \
IntelliHelper/IntelliColorPicker.cpp \
+ IntelliHelper/IntelliDatamanager.cpp \
IntelliHelper/IntelliRenderSettings.cpp \
IntelliHelper/IntelliToolsettings.cpp \
IntelliHelper/IntelliTriangulation.cpp \
@@ -43,6 +44,7 @@ HEADERS += \
Image/IntelliRasterImage.h \
Image/IntelliShapedImage.h \
IntelliHelper/IntelliColorPicker.h \
+ IntelliHelper/IntelliDatamanager.h \
IntelliHelper/IntelliRenderSettings.h \
IntelliHelper/IntelliToolsettings.h \
IntelliHelper/IntelliTriangulation.h \
diff --git a/src/Layer/PaintingArea.cpp b/src/Layer/PaintingArea.cpp
index 0bf6a0e..d147488 100644
--- a/src/Layer/PaintingArea.cpp
+++ b/src/Layer/PaintingArea.cpp
@@ -17,10 +17,27 @@
#include "Tool/IntelliToolRectangle.h"
#include "Tool/IntelliToolFloodFill.h"
#include "Tool/IntelliToolPolygon.h"
+#include "GUI/IntelliPhotoGui.h"
+LayerObject::LayerObject(){
+
+}
+
+LayerObject::LayerObject(const LayerObject& layer){
+ if(layer.image->getTypeOfImage()==ImageType::RASTERIMAGE){
+ this->image = new IntelliRasterImage(*dynamic_cast(layer.image));
+ }else if(layer.image->getTypeOfImage()==ImageType::SHAPEDIMAGE){
+ this->image = new IntelliShapedImage(*dynamic_cast(layer.image));
+ }
+ this->width = layer.width;
+ this->height = layer.height;
+ this->widthOffset = layer.widthOffset;
+ this->heightOffset = layer.heightOffset;
+ this->alpha = layer.alpha;
+}
PaintingArea::PaintingArea(int maxWidth, int maxHeight, QWidget*parent)
- : QWidget(parent){
+ : QLabel(parent){
this->Tool = nullptr;
this->setLayerDimensions(maxWidth, maxHeight);
@@ -48,32 +65,48 @@ void PaintingArea::setRenderSettings(bool isFastRenderingOn){
}
}
+bool PaintingArea::getRenderSettings(){
+ return this->renderSettings.isFastRenderering();
+}
+
void PaintingArea::setLayerDimensions(int maxWidth, int maxHeight){
//set standart parameter
this->maxWidth = maxWidth;
this->maxHeight = maxHeight;
Canvas = new QImage(maxWidth,maxHeight, QImage::Format_ARGB32);
+ this->offsetXDimension = maxWidth/2;
+ this->offsetYDimension = maxHeight/2;
+
// Roots the widget to the top left even if resized
setAttribute(Qt::WA_StaticContents);
}
-int PaintingArea::addLayer(int width, int height, int widthOffset, int heightOffset, IntelliImage::ImageType type){
+void PaintingArea::setPixelToActive(QColor color, QPoint point){
+ layerBundle[static_cast(activeLayer)].image->drawPixel(point, color);
+}
+
+void PaintingArea::setPolygonDataToActive(std::vector points){
+ layerBundle[static_cast(activeLayer)].image->setPolygon(points);
+}
+
+int PaintingArea::addLayer(int width, int height, int widthOffset, int heightOffset,int alpha, ImageType type){
LayerObject newLayer;
updateTools();
newLayer.width = width;
newLayer.height = height;
newLayer.widthOffset = widthOffset;
newLayer.heightOffset = heightOffset;
- if(type==IntelliImage::ImageType::RASTERIMAGE) {
+ newLayer.alpha = alpha;
+ if(type==ImageType::RASTERIMAGE) {
newLayer.image = new IntelliRasterImage(width,height,renderSettings.isFastRenderering());
- }else if(type==IntelliImage::ImageType::SHAPEDIMAGE) {
+ }else if(type==ImageType::SHAPEDIMAGE) {
newLayer.image = new IntelliShapedImage(width, height, renderSettings.isFastRenderering());
}
- newLayer.alpha = 255;
this->layerBundle.push_back(newLayer);
activeLayer = static_cast(layerBundle.size()) - 1;
+ historyadd();
return activeLayer;
}
@@ -98,6 +131,7 @@ void PaintingArea::slotDeleteActiveLayer(){
this->layerBundle.erase(layerBundle.begin() + activeLayer);
activeLayer--;
}
+ historyadd();
}
void PaintingArea::setLayerActive(int idx){
@@ -116,11 +150,11 @@ void PaintingArea::setLayerAlpha(int idx, int alpha){
}
void PaintingArea::setPolygon(int idx){
if(idx>=0&&idx(layerBundle.size())) {
- if(layerBundle[static_cast(idx)].image->getTypeOfImage()==IntelliImage::ImageType::SHAPEDIMAGE) {
+ if(layerBundle[static_cast(idx)].image->getTypeOfImage()==ImageType::SHAPEDIMAGE) {
delete this->Tool;
this->Tool = new IntelliToolPolygon(this,&colorPicker,&Toolsettings, true);
isSettingPolygon = true;
- this->DummyGui->setToolWidth(5);
+ this->guiReference->setToolWidth(5);
}
}
}
@@ -137,6 +171,13 @@ bool PaintingArea::open(const QString &filePath){
return open;
}
+void PaintingArea::deleteAllLayers(){
+ for(auto layer: layerBundle){
+ delete layer.image;
+ }
+ layerBundle.clear();
+}
+
// Save the current image
bool PaintingArea::save(const QString &filePath, const char*fileFormat){
if(layerBundle.size()==0) {
@@ -165,6 +206,7 @@ void PaintingArea::movePositionActive(int x, int y){
updateTools();
layerBundle[static_cast(activeLayer)].widthOffset += x;
layerBundle[static_cast(activeLayer)].heightOffset += y;
+ historyadd();
}
void PaintingArea::moveActiveLayer(int idx){
@@ -174,7 +216,8 @@ void PaintingArea::moveActiveLayer(int idx){
}else if(idx==-1) {
this->selectLayerDown();
}
- DummyGui->UpdateGui();
+ guiReference->UpdateGui();
+ historyadd();
}
void PaintingArea::slotActivateLayer(int a){
@@ -233,11 +276,11 @@ void PaintingArea::createFloodFillTool(){
}
int PaintingArea::getWidthOfActive(){
- return this->layerBundle[static_cast(activeLayer)].width;
+ return this->layerBundle[static_cast(activeLayer)].width;
}
int PaintingArea::getHeightOfActive(){
- return this->layerBundle[static_cast(activeLayer)].height;
+ return this->layerBundle[static_cast(activeLayer)].height;
}
int PaintingArea::getMaxWidth(){
@@ -248,12 +291,12 @@ int PaintingArea::getMaxHeight(){
return this->maxHeight;
}
-IntelliImage::ImageType PaintingArea::getTypeOfImageRealLayer(){
- return this->layerBundle[static_cast(activeLayer)].image->getTypeOfImage();
+ImageType PaintingArea::getTypeOfImageRealLayer(){
+ return this->layerBundle[static_cast(activeLayer)].image->getTypeOfImage();
}
std::vector PaintingArea::getPolygonDataOfRealLayer(){
- return this->layerBundle[static_cast(activeLayer)].image->getPolygonData();
+ return this->layerBundle[static_cast(activeLayer)].image->getPolygonData();
}
// If a mouse button is pressed check if it was the
@@ -265,12 +308,12 @@ void PaintingArea::mousePressEvent(QMouseEvent*event){
}
if(Tool == nullptr)
return;
- int x = event->x() - layerBundle[static_cast(activeLayer)].widthOffset;
- int y = event->y() - layerBundle[static_cast(activeLayer)].heightOffset;
+ int x = event->x() - layerBundle[static_cast(activeLayer)].widthOffset-offsetXDimension;
+ int y = event->y() - layerBundle[static_cast(activeLayer)].heightOffset-offsetYDimension;
if(event->button() == Qt::LeftButton) {
- Tool->onMouseLeftPressed(x, y);
+ Tool->onMouseLeftPressed(x, y);
}else if(event->button() == Qt::RightButton) {
- Tool->onMouseRightPressed(x, y);
+ Tool->onMouseRightPressed(x, y);
}
update();
}
@@ -284,8 +327,8 @@ void PaintingArea::mouseMoveEvent(QMouseEvent*event){
}
if(Tool == nullptr)
return;
- int x = event->x() - layerBundle[static_cast(activeLayer)].widthOffset;
- int y = event->y() - layerBundle[static_cast(activeLayer)].heightOffset;
+ int x = event->x() - layerBundle[static_cast(activeLayer)].widthOffset-offsetXDimension;
+ int y = event->y() - layerBundle[static_cast(activeLayer)].heightOffset-offsetYDimension;
Tool->onMouseMoved(x, y);
update();
}
@@ -296,8 +339,8 @@ void PaintingArea::mouseReleaseEvent(QMouseEvent*event){
return;
if(Tool == nullptr)
return;
- int x = event->x() - layerBundle[static_cast(activeLayer)].widthOffset;
- int y = event->y() - layerBundle[static_cast(activeLayer)].heightOffset;
+ int x = event->x() - layerBundle[static_cast(activeLayer)].widthOffset-offsetXDimension;
+ int y = event->y() - layerBundle[static_cast(activeLayer)].heightOffset-offsetYDimension;
if(event->button() == Qt::LeftButton) {
Tool->onMouseLeftReleased(x, y);
}else if(event->button() == Qt::RightButton) {
@@ -322,11 +365,17 @@ void PaintingArea::wheelEvent(QWheelEvent*event){
// The QPaintEvent is sent to widgets that need to
// update themselves
void PaintingArea::paintEvent(QPaintEvent*event){
+ this->setFixedSize(QSize(maxWidth*2,maxHeight*2));
this->drawLayers();
- QPainter painter(this);
- QRect dirtyRec = event->rect();
- painter.drawImage(dirtyRec, *Canvas, dirtyRec);
+ QPainter painter(this);
+
+ //insert zoom factor here
+ painter.scale(1,1);
+
+ //calulate image here for scroll
+ //Todo set offset in first to parameters and calulate them into mouse position
+ painter.drawImage(0, 0, *Canvas, -offsetXDimension, -offsetYDimension);
update();
}
@@ -341,7 +390,7 @@ void PaintingArea::selectLayerUp(){
void PaintingArea::selectLayerDown(){
updateTools();
if(activeLayer>0) {
- std::swap(layerBundle[static_cast(activeLayer)], layerBundle[static_cast(activeLayer - 1)]);
+ std::swap(layerBundle[static_cast(activeLayer)], layerBundle[static_cast(activeLayer - 1)]);
activeLayer--;
}
}
@@ -385,11 +434,11 @@ bool PaintingArea::createTempTopLayer(int idx){
if(idx>=0) {
LayerObject newLayer;
newLayer.alpha = 255;
- newLayer.height = layerBundle[static_cast(idx)].height;
- newLayer.width = layerBundle[static_cast(idx)].width;
- newLayer.heightOffset = layerBundle[static_cast(idx)].heightOffset;
- newLayer.widthOffset = layerBundle[static_cast(idx)].widthOffset;
- newLayer.image = layerBundle[static_cast(idx)].image->getDeepCopy();
+ newLayer.height = layerBundle[static_cast(idx)].height;
+ newLayer.width = layerBundle[static_cast(idx)].width;
+ newLayer.heightOffset = layerBundle[static_cast(idx)].heightOffset;
+ newLayer.widthOffset = layerBundle[static_cast(idx)].widthOffset;
+ newLayer.image = layerBundle[static_cast(idx)].image->getDeepCopy();
layerBundle.insert(layerBundle.begin() + idx + 1,newLayer);
return true;
}
@@ -435,6 +484,10 @@ QImage PaintingArea::getImageDataOfActiveLayer(){
return returnImage;
}
+std::vector* PaintingArea::getLayerBundle(){
+ return &layerBundle;
+}
+
void PaintingArea::updateTools(){
if(Tool!=nullptr) {
if(Tool->getIsDrawing()) {
@@ -449,3 +502,33 @@ void PaintingArea::updateTools(){
}
}
}
+
+void PaintingArea::historyadd(){
+
+ if (++historyPresent == 100){
+ historyPresent = 0;
+ }
+ historyMaxFuture = historyPresent;
+ if (historyPresent == historyMaxPast)
+ if (++historyMaxPast == 100)
+ historyMaxPast = 0;
+ history[static_cast(historyPresent)] = layerBundle;
+}
+
+void PaintingArea::historyGoBack(){
+ if (historyPresent != historyMaxPast){
+ if (--historyPresent == -1)
+ historyPresent = 99;
+ layerBundle = history[static_cast(historyPresent)];
+ }
+ this->guiReference->UpdateGui();
+}
+
+void PaintingArea::historyGoForward(){
+ if (historyPresent != historyMaxFuture){
+ if (++historyPresent == 100)
+ historyPresent = 0;
+ layerBundle = history[static_cast(historyPresent)];
+ }
+ this->guiReference->UpdateGui();
+}
diff --git a/src/Layer/PaintingArea.h b/src/Layer/PaintingArea.h
index 58eb411..4c6d109 100644
--- a/src/Layer/PaintingArea.h
+++ b/src/Layer/PaintingArea.h
@@ -7,7 +7,7 @@
#include
#include
#include
-#include "GUI/IntelliPhotoGui.h"
+#include
#include "Image/IntelliImage.h"
#include "Image/IntelliRasterImage.h"
#include "Image/IntelliShapedImage.h"
@@ -16,7 +16,7 @@
//for unit testing
class UnitTest;
-
+class IntelliPhotoGui;
/*!
* \brief The LayerObject struct holds all the information needed to construct a layer
*/
@@ -45,12 +45,16 @@ struct LayerObject {
* \brief alpha - Stores the alpha value of the layer (default=255).
*/
int alpha = 255;
+
+ LayerObject();
+
+ LayerObject(const LayerObject& layer);
};
/*!
* \brief The PaintingArea class manages the methods and stores information about the current painting area, which is the currently opened project
*/
-class PaintingArea : public QWidget
+class PaintingArea : public QLabel
{
friend UnitTest;
// Declares our class as a QObject which is the base class
@@ -79,6 +83,12 @@ PaintingArea(int maxWidth = 600, int maxHeight = 600, QWidget*parent = nullptr);
*/
void setRenderSettings(bool isFastRenderingOn);
+/*!
+ * \brief getRenderSettings updates all Images to the new Rendersetting.
+ * \param isFastRenderingOn is the new given flag for the FastRenderer.
+ */
+bool getRenderSettings();
+
/*!
* \brief The open method is used for loading a picture into the current layer.
* \param filePath - Path and Name which are used to determine where the to-be-opened file is stored.
@@ -93,16 +103,21 @@ bool open(const QString &filePath);
*/
bool save(const QString &filePath, const char*fileFormat);
+/*!
+ * \brief deleteAllLayers deletes all layers
+ */
+void deleteAllLayers();
/*!
* \brief The addLayer adds a layer to the current project/ painting area
* \param width - Width of the layer in pixles
* \param height - Height of the layer in pixles
* \param widthOffset - Offset of the layer measured to the left border of the painting area in pixles
* \param heightOffset - Offset of the layer measured to the top border of the painting area in pixles
+ * \param alpha - Transparence of the layer
* \param type - Defining the ImageType of the new layer
* \return Returns the number of layers in the project
*/
-int addLayer(int width, int height, int widthOffset = 0, int heightOffset = 0, IntelliImage::ImageType type = IntelliImage::ImageType::RASTERIMAGE);
+int addLayer(int width, int height, int widthOffset = 0, int heightOffset = 0, int alpha=255, ImageType type = ImageType::RASTERIMAGE);
/*!
* \brief The addLayerAt adds a layer to the current project/ painting area at a specific position in the layer stack
* \param idx - Index of the position the new layer should be added
@@ -113,7 +128,7 @@ int addLayer(int width, int height, int widthOffset = 0, int heightOffset = 0, I
* \param type - Defining the ImageType of the new layer
* \return Returns the id of the layer position
*/
-int addLayerAt(int idx, int width, int height, int widthOffset = 0, int heightOffset = 0, IntelliImage::ImageType type = IntelliImage::ImageType::RASTERIMAGE);
+int addLayerAt(int idx, int width, int height, int widthOffset = 0, int heightOffset = 0, ImageType type = ImageType::RASTERIMAGE);
/*!
* \brief The deleteLayer method removes a layer at a given idx
* \param idx - The index of the layer to be removed
@@ -184,7 +199,7 @@ int getMaxWidth();
int getMaxHeight();
-IntelliImage::ImageType getTypeOfImageRealLayer();
+ImageType getTypeOfImageRealLayer();
std::vector getPolygonDataOfRealLayer();
@@ -198,9 +213,23 @@ IntelliImage* getImageOfActiveLayer();
*/
QImage getImageDataOfActiveLayer();
+/*!
+ * \brief getLayerBundle returns the real active layerbundle (care!)
+ * \return the reference of the currentLayerBundle
+ */
+std::vector* getLayerBundle();
+
IntelliToolsettings Toolsettings;
IntelliColorPicker colorPicker;
+void historyGoBack();
+void historyGoForward();
+
+void setLayerDimensions(int maxWidth, int maxHeight);
+
+void setPixelToActive(QColor color, QPoint point);
+
+void setPolygonDataToActive(std::vector points);
public slots:
/*!
* \brief The slotActivateLayer method handles the event of selecting one layer as active
@@ -222,12 +251,16 @@ void wheelEvent(QWheelEvent*event) override;
void paintEvent(QPaintEvent*event) override;
private:
-void setLayerDimensions(int maxWidth, int maxHeight);
+//offset for the displayable
+int offsetXDimension;
+int offsetYDimension;
+
void selectLayerUp();
void selectLayerDown();
IntelliTool* copyActiveTool();
QImage* Canvas;
+QImage ScaledCanvas;
int maxWidth;
int maxHeight;
@@ -235,7 +268,7 @@ bool isSettingPolygon = false;
IntelliRenderSettings renderSettings;
IntelliTool* Tool;
-IntelliPhotoGui* DummyGui;
+IntelliPhotoGui* guiReference;
std::vector layerBundle;
int activeLayer = -1;
@@ -245,6 +278,14 @@ void drawLayers(bool forSaving = false);
bool createTempTopLayer(int idx);
void updateTools();
+
+std::vector history[100] = {layerBundle};
+int historyMaxPast = 0;
+int historyMaxFuture = 0;
+int historyPresent = 0;
+
+void historyadd();
+
};
#endif
diff --git a/src/Tool/IntelliTool.cpp b/src/Tool/IntelliTool.cpp
index 07ed62b..d113410 100644
--- a/src/Tool/IntelliTool.cpp
+++ b/src/Tool/IntelliTool.cpp
@@ -1,5 +1,6 @@
#include "IntelliTool.h"
#include "Layer/PaintingArea.h"
+#include "GUI/IntelliPhotoGui.h"
IntelliTool::IntelliTool(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings){
this->Area = Area;
@@ -50,7 +51,7 @@ void IntelliTool::onMouseMoved(int x, int y){
void IntelliTool::onWheelScrolled(int value){
//if needed for future general tasks implement in here
- Area->DummyGui->setToolWidth(value + Toolsettings->getLineWidth());
+ Area->guiReference->setToolWidth(value + Toolsettings->getLineWidth());
}
bool IntelliTool::createToolLayer(){
@@ -88,7 +89,8 @@ void IntelliTool::mergeToolLayer(){
if(Canvas->image->getPolygonData().size() > 0) {
activeLayer->image->setPolygon(Canvas->image->getPolygonData());
}
- Area->DummyGui->UpdateGui();
+ Area->guiReference->UpdateGui();
+ Area->historyadd();
}
void IntelliTool::deleteToolLayer(){
@@ -96,10 +98,10 @@ void IntelliTool::deleteToolLayer(){
this->Canvas = nullptr;
}
-IntelliTool::Tooltype IntelliTool::getTooltype(){
+IntelliTool::Tooltype IntelliTool::getTooltype() const {
return ActiveType;
}
-bool IntelliTool::getIsDrawing(){
+bool IntelliTool::getIsDrawing() const {
return isDrawing;
}
diff --git a/src/Tool/IntelliTool.h b/src/Tool/IntelliTool.h
index 07b78bf..40901f0 100644
--- a/src/Tool/IntelliTool.h
+++ b/src/Tool/IntelliTool.h
@@ -127,9 +127,9 @@ virtual void onWheelScrolled(int value);
*/
virtual void onMouseMoved(int x, int y);
-Tooltype getTooltype();
+Tooltype getTooltype() const;
-bool getIsDrawing();
+bool getIsDrawing() const;
};
#endif
diff --git a/src/Tool/IntelliToolPolygon.cpp b/src/Tool/IntelliToolPolygon.cpp
index 507ffb7..d8dc357 100644
--- a/src/Tool/IntelliToolPolygon.cpp
+++ b/src/Tool/IntelliToolPolygon.cpp
@@ -24,7 +24,7 @@ IntelliToolPolygon::~IntelliToolPolygon(){
}
void IntelliToolPolygon::onMouseLeftPressed(int x, int y){
- if(!drawingOfPolygon && Area->getTypeOfImageRealLayer() == IntelliImage::ImageType::SHAPEDIMAGE && x > 0 && y > 0 && xgetWidthOfActive() && ygetHeightOfActive()) {
+ if(!drawingOfPolygon && Area->getTypeOfImageRealLayer() == ImageType::SHAPEDIMAGE && x > 0 && y > 0 && xgetWidthOfActive() && ygetHeightOfActive()) {
if(Area->getPolygonDataOfRealLayer().size()>2) {
std::vector Triangles = IntelliTriangulation::calculateTriangles(Area->getPolygonDataOfRealLayer());
QPoint Point(x,y);
@@ -37,7 +37,7 @@ void IntelliToolPolygon::onMouseLeftPressed(int x, int y){
isInside = true;
}
}
- else if(!drawingOfPolygon && Area->getTypeOfImageRealLayer() == IntelliImage::ImageType::RASTERIMAGE && x >= 0 && y >= 0 && xgetWidthOfActive() && ygetHeightOfActive()) {
+ else if(!drawingOfPolygon && Area->getTypeOfImageRealLayer() == ImageType::RASTERIMAGE && x >= 0 && y >= 0 && xgetWidthOfActive() && ygetHeightOfActive()) {
isInside = true;
}
diff --git a/src/main.cpp b/src/main.cpp
index 30adab2..dc5caa5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2,11 +2,11 @@
#include
#include
#include
+#include
int main(int argc, char*argv[]){
// The main application
QApplication app(argc, argv);
-
// Create and open the main window
IntelliPhotoGui window;
window.show();