mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-19 23:00:34 +02:00
Minor Code Style Update + Documentation Spelling Fix
This commit is contained in:
@@ -69,7 +69,7 @@ void IntelliPhotoGui::slotCreateNewLayer(){
|
||||
// Stores button value
|
||||
bool ok1, ok2;
|
||||
|
||||
// tr("New Layer") is the title
|
||||
// "New Layer" is the title of the window
|
||||
// the next tr is the text to display
|
||||
// Define the standard Value, min, max, step and ok button
|
||||
int width = QInputDialog::getInt(this, tr("New Layer"),
|
||||
@@ -91,7 +91,7 @@ void IntelliPhotoGui::slotDeleteLayer(){
|
||||
// Stores button value
|
||||
bool ok;
|
||||
|
||||
// tr("delete Layer") is the title
|
||||
// "delete Layer" is the title of the window
|
||||
// the next tr is the text to display
|
||||
// Define the standard Value, min, max, step and ok button
|
||||
int layerNumber = QInputDialog::getInt(this, tr("delete Layer"),
|
||||
@@ -114,13 +114,13 @@ void IntelliPhotoGui::slotSetActiveAlpha(){
|
||||
// Stores button value
|
||||
bool ok1, ok2;
|
||||
|
||||
// tr("Layer to set on") is the title
|
||||
// "Layer to set on" is the title of the window
|
||||
// the next tr is the text to display
|
||||
// Define the standard Value, min, max, step and ok button
|
||||
int layer = QInputDialog::getInt(this, tr("Layer to set on"),
|
||||
tr("Layer:"),
|
||||
-1,-1,100,1, &ok1);
|
||||
// tr("New Alpha") is the title
|
||||
// "New Alpha" is the title of the window
|
||||
int alpha = QInputDialog::getInt(this, tr("New Alpha"),
|
||||
tr("Alpha:"),
|
||||
255,0, 255, 1, &ok2);
|
||||
@@ -164,21 +164,21 @@ void IntelliPhotoGui::slotClearActiveLayer(){
|
||||
// Stores button value
|
||||
bool ok1, ok2, ok3, ok4;
|
||||
|
||||
// tr("Red Input") is the title
|
||||
// "Red Input" is the title of the window
|
||||
// the next tr is the text to display
|
||||
// Define the standard Value, min, max, step and ok button
|
||||
int red = QInputDialog::getInt(this, tr("Red Input"),
|
||||
tr("Red:"),
|
||||
255,0, 255,1, &ok1);
|
||||
// tr("Green Input") is the title
|
||||
// "Green Input" is the title of the window
|
||||
int green = QInputDialog::getInt(this, tr("Green Input"),
|
||||
tr("Green:"),
|
||||
255,0, 255, 1, &ok2);
|
||||
// tr("Blue Input") is the title
|
||||
// "Blue Input" is the title of the window
|
||||
int blue = QInputDialog::getInt(this, tr("Blue Input"),
|
||||
tr("Blue:"),
|
||||
255,0, 255, 1, &ok3);
|
||||
// tr("Alpha Input") is the title
|
||||
// "Alpha Input" is the title of the window
|
||||
int alpha = QInputDialog::getInt(this, tr("Alpha Input"),
|
||||
tr("Alpha:"),
|
||||
255,0, 255, 1, &ok4);
|
||||
@@ -192,7 +192,7 @@ void IntelliPhotoGui::slotSetActiveLayer(){
|
||||
// Stores button value
|
||||
bool ok1;
|
||||
|
||||
// tr("Layer to set on") is the title
|
||||
// "Layer to set on" is the title of the window
|
||||
// the next tr is the text to display
|
||||
// Define the standard Value, min, max, step and ok button
|
||||
int layer = QInputDialog::getInt(this, tr("Layer to set on"),
|
||||
@@ -418,7 +418,7 @@ void IntelliPhotoGui::createGui(){
|
||||
void IntelliPhotoGui::setIntelliStyle(){
|
||||
// Set the title
|
||||
setWindowTitle("IntelliPhoto Prototype");
|
||||
//set style sheet
|
||||
// Set style sheet
|
||||
this->setStyleSheet("background-color:rgb(64,64,64)");
|
||||
this->centralGuiWidget->setStyleSheet("color:rgb(255,255,255)");
|
||||
this->menuBar()->setStyleSheet("color:rgb(255,255,255)");
|
||||
@@ -431,7 +431,7 @@ bool IntelliPhotoGui::maybeSave(){
|
||||
if (false) {
|
||||
QMessageBox::StandardButton ret;
|
||||
|
||||
// Painting is the title
|
||||
// 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"
|
||||
|
||||
@@ -87,7 +87,6 @@ private:
|
||||
QMenu *helpMenu;
|
||||
|
||||
// All the actions that can occur
|
||||
|
||||
// meta image actions (need further modularisation)
|
||||
QAction *actionOpen;
|
||||
QAction *actionExit;
|
||||
@@ -124,7 +123,6 @@ private:
|
||||
// main GUI elements
|
||||
QWidget* centralGuiWidget;
|
||||
QGridLayout *mainLayout;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -71,7 +71,6 @@ void IntelliImage::drawLine(const QPoint &p1, const QPoint& p2, const QColor& co
|
||||
|
||||
// Draw a line from the last registered point to the current
|
||||
painter.drawLine(p1, p2);
|
||||
|
||||
}
|
||||
|
||||
void IntelliImage::drawPlain(const QColor& color){
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
class IntelliColorPicker{
|
||||
public:
|
||||
/*!
|
||||
* \brief IntelliColorPicker construktor, setting 2 preset colors, be careful, theese color may change in production.
|
||||
* \brief IntelliColorPicker constructor, setting 2 preset colors, be careful, theese color may change in production.
|
||||
*/
|
||||
IntelliColorPicker();
|
||||
|
||||
|
||||
@@ -108,7 +108,6 @@ std::vector<Triangle> IntelliHelper::calculateTriangles(std::vector<QPoint> poly
|
||||
Vertices[static_cast<size_t>(prevOfPost)].vertex,
|
||||
Vertices[static_cast<size_t>(postOfPost)].vertex);
|
||||
Vertices[static_cast<size_t>(post)].isTip = isTip(Vertices[static_cast<size_t>(post)].interiorAngle);
|
||||
|
||||
}
|
||||
return Triangles;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ struct Triangle{
|
||||
QPoint A,B,C;
|
||||
};
|
||||
|
||||
|
||||
namespace IntelliHelper {
|
||||
|
||||
/*!
|
||||
@@ -59,7 +58,6 @@ namespace IntelliHelper {
|
||||
* \return Returns true if the point lies in the üpolygon, otherwise false.
|
||||
*/
|
||||
bool isInPolygon(std::vector<Triangle> &triangles, QPoint &point);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
PaintingArea::PaintingArea(int maxWidth, int maxHeight, QWidget *parent)
|
||||
:QWidget(parent){
|
||||
// Testing Area
|
||||
// test yout tool here and reset after accomplished test
|
||||
this->Tool = new IntelliToolFloodFill(this, &colorPicker);
|
||||
this->setUp(maxWidth, maxHeight);
|
||||
//tetsing
|
||||
this->addLayer(200,200,0,0,ImageType::Shaped_Image);
|
||||
layerBundle[0].image->drawPlain(QColor(255,0,0,255));
|
||||
std::vector<QPoint> polygon;
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "Tool/IntelliTool.h"
|
||||
#include "IntelliHelper/IntelliColorPicker.h"
|
||||
|
||||
|
||||
struct LayerObject{
|
||||
IntelliImage* image;
|
||||
int width;
|
||||
@@ -58,7 +57,6 @@ public:
|
||||
void createLineTool();
|
||||
|
||||
public slots:
|
||||
|
||||
// Events to handle
|
||||
void slotActivateLayer(int a);
|
||||
void slotDeleteActiveLayer();
|
||||
@@ -95,7 +93,6 @@ private:
|
||||
|
||||
void resizeImage(QImage *image_res, const QSize &newSize);
|
||||
|
||||
|
||||
//Helper for Tool
|
||||
void createTempLayerAfter(int idx);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user