IntelliPhoto 0.5

IntelliToolsettings.cpp
Go to the documentation of this file.
1 #include "IntelliToolsettings.h"
2 #include <QInputDialog>
3
4 IntelliToolsettings::IntelliToolsettings()
5 {
6 lineWidth = 1;
7 innerAlpha = 255;
8 Linestyle = LineStyle::SOLID_LINE;
9 }
10
11 IntelliToolsettings::~IntelliToolsettings(){
12
13 }
14
15 int IntelliToolsettings::getLineWidth(){
16 return lineWidth;
17 }
18
19 void IntelliToolsettings::setLineWidth(){
20 lineWidth = QInputDialog::getInt(nullptr,"Line Width Input", "Width",1,1,50,1);
21 }
22
23 void IntelliToolsettings::setLineWidth(int LineWidth){
24 if(LineWidth < 1) {
25 LineWidth = 1;
26 }
27 else if(LineWidth > 50) {
28 LineWidth = 50;
29 }
30 lineWidth = LineWidth;
31 }
32
33 int IntelliToolsettings::getInnerAlpha(){
34 return this->innerAlpha;
35 }
36
37 void IntelliToolsettings::setInnerAlpha(){
38 this->innerAlpha = QInputDialog::getInt(nullptr,"Inner Aplha Input", "Value",0,0,255,1);
39 }
40
41 void IntelliToolsettings::setInnerAlpha(int innerAlpha){
42 if(innerAlpha < 0) {
43 innerAlpha = 0;
44 }
45 else if(innerAlpha > 255) {
46 innerAlpha = 255;
47 }
48 this->innerAlpha = innerAlpha;
49 }
50
51 IntelliToolsettings::LineStyle IntelliToolsettings::getLinestyle(){
52 return Linestyle;
53 }
IntelliToolsettings::setLineWidth
void setLineWidth()
Definition: IntelliToolsettings.cpp:19
IntelliToolsettings::getLinestyle
LineStyle getLinestyle()
Definition: IntelliToolsettings.cpp:51
IntelliToolsettings::LineStyle::SOLID_LINE
IntelliToolsettings.h
IntelliToolsettings::LineStyle
LineStyle
The LineStyle enum classifing all ways of drawing a line.
Definition: IntelliToolsettings.h:9
IntelliToolsettings::~IntelliToolsettings
virtual ~IntelliToolsettings()
Definition: IntelliToolsettings.cpp:11
IntelliToolsettings::getInnerAlpha
int getInnerAlpha()
Definition: IntelliToolsettings.cpp:33
IntelliToolsettings::getLineWidth
int getLineWidth()
Definition: IntelliToolsettings.cpp:15
IntelliToolsettings::setInnerAlpha
void setInnerAlpha()
Definition: IntelliToolsettings.cpp:37
IntelliToolsettings::IntelliToolsettings
IntelliToolsettings()
Definition: IntelliToolsettings.cpp:4