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 ea836cf..b9fbf6a 100644
--- a/docs/html/_intelli_color_picker_8h_source.html
+++ b/docs/html/_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 9658796..94da67a 100644
--- a/docs/html/_intelli_photo_gui_8cpp_source.html
+++ b/docs/html/_intelli_photo_gui_8cpp_source.html
@@ -91,866 +91,869 @@ $(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");
+
+
@@ -964,9 +967,8 @@ $(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.
@@ -977,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_tool_8cpp_source.html b/docs/html/_intelli_tool_8cpp_source.html
index 24a5125..3442d23 100644
--- a/docs/html/_intelli_tool_8cpp_source.html
+++ b/docs/html/_intelli_tool_8cpp_source.html
@@ -215,14 +215,13 @@ $(document).ready(function(){initNavTree('_intelli_tool_8cpp_source.html',''); i
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.
diff --git a/docs/html/_intelli_tool_circle_8cpp_source.html b/docs/html/_intelli_tool_circle_8cpp_source.html
index c63d9b6..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);
@@ -183,7 +183,7 @@ $(document).ready(function(){initNavTree('_intelli_tool_circle_8cpp_source.html'
-
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.
@@ -194,7 +194,6 @@ $(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.
diff --git a/docs/html/_intelli_tool_flood_fill_8cpp_source.html b/docs/html/_intelli_tool_flood_fill_8cpp_source.html
index 5d651a9..dcbec6c 100644
--- a/docs/html/_intelli_tool_flood_fill_8cpp_source.html
+++ b/docs/html/_intelli_tool_flood_fill_8cpp_source.html
@@ -193,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 1800f17..1982683 100644
--- a/docs/html/_intelli_tool_line_8cpp_source.html
+++ b/docs/html/_intelli_tool_line_8cpp_source.html
@@ -157,7 +157,6 @@ $(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.
diff --git a/docs/html/_intelli_tool_pen_8cpp_source.html b/docs/html/_intelli_tool_pen_8cpp_source.html
index 327345e..8dbea6d 100644
--- a/docs/html/_intelli_tool_pen_8cpp_source.html
+++ b/docs/html/_intelli_tool_pen_8cpp_source.html
@@ -157,7 +157,6 @@ $(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.
diff --git a/docs/html/_intelli_tool_plain_8cpp_source.html b/docs/html/_intelli_tool_plain_8cpp_source.html
index 1714d7b..569c21b 100644
--- a/docs/html/_intelli_tool_plain_8cpp_source.html
+++ b/docs/html/_intelli_tool_plain_8cpp_source.html
@@ -142,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 7c8e286..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) {
-
+
@@ -252,7 +252,6 @@ $(document).ready(function(){initNavTree('_intelli_tool_polygon_8cpp_source.html
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,...
@@ -270,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 ...
diff --git a/docs/html/_intelli_tool_rectangle_8cpp_source.html b/docs/html/_intelli_tool_rectangle_8cpp_source.html
index b88f051..c673a22 100644
--- a/docs/html/_intelli_tool_rectangle_8cpp_source.html
+++ b/docs/html/_intelli_tool_rectangle_8cpp_source.html
@@ -164,7 +164,6 @@ $(document).ready(function(){initNavTree('_intelli_tool_rectangle_8cpp_source.ht
-
QColor getSecondColor()
A function to read the secondary selected color.
The PaintingArea class manages the methods and stores information about the current painting area,...
@@ -174,7 +173,6 @@ $(document).ready(function(){initNavTree('_intelli_tool_rectangle_8cpp_source.ht
-
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/_painting_area_8cpp_source.html b/docs/html/_painting_area_8cpp_source.html
index e81c76c..c073e81 100644
--- a/docs/html/_painting_area_8cpp_source.html
+++ b/docs/html/_painting_area_8cpp_source.html
@@ -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);
@@ -566,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.
@@ -599,21 +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_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/tst__unittest_8cpp_source.html b/docs/html/tst__unittest_8cpp_source.html
index 572e3bf..c3292b4 100644
--- a/docs/html/tst__unittest_8cpp_source.html
+++ b/docs/html/tst__unittest_8cpp_source.html
@@ -1803,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.
@@ -1826,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()