mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-13 20:00:32 +02:00
added comments but gui
This commit is contained in:
@@ -61,7 +61,7 @@ bool IntelliDatamanager::loadProject(PaintingArea* Canvas, QString filePath){
|
||||
in >> widthCanvas >> heightCanvas;
|
||||
in >> numberOffLayers;
|
||||
|
||||
Canvas->setLayerDimensions(widthCanvas, heightCanvas);
|
||||
Canvas->setCanvasDimensions(widthCanvas, heightCanvas);
|
||||
for(int i = 0; i<numberOffLayers; i++) {
|
||||
int width, height, widthOffset, heightOffset, alpha;
|
||||
in >> width >> height >> widthOffset >> heightOffset >> alpha;
|
||||
@@ -88,7 +88,7 @@ bool IntelliDatamanager::loadProject(PaintingArea* Canvas, QString filePath){
|
||||
for(int k = 0; k<width; k++) {
|
||||
int red, green, blue, alpha;
|
||||
in >> red >> green >> blue >> alpha;
|
||||
Canvas->setPixelToActive(QColor(red, green, blue, alpha), QPoint(j, k));
|
||||
Canvas->drawPixelOntoActive(QColor(red, green, blue, alpha), QPoint(j, k));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,20 @@ class PaintingArea;
|
||||
|
||||
namespace IntelliDatamanager {
|
||||
|
||||
/*!
|
||||
* \brief loadProject loads a project from a file, closes current project.
|
||||
* \param Canvas - Reference to the used Canvas.
|
||||
* \param filePath - Filepath to the project which should be opened.
|
||||
* \return True if everything worked, false otherwise.
|
||||
*/
|
||||
bool loadProject(PaintingArea* Canvas, QString filePath = "unnamed.idf");
|
||||
|
||||
/*!
|
||||
* \brief saveProject saves the current project to a file.
|
||||
* \param Canvas - Reference to the used Canvas.
|
||||
* \param filePath - Filepath to the project which should be saved.
|
||||
* \return True if everything worked, false otherwise.
|
||||
*/
|
||||
bool saveProject(PaintingArea* Canvas, QString filePath = "unnamed.idf");
|
||||
|
||||
}
|
||||
|
||||
34
src/IntelliHelper/IntelliRenderSettings.h.autosave
Normal file
34
src/IntelliHelper/IntelliRenderSettings.h.autosave
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef INTELLIRENDERSETTINGS_H
|
||||
#define INTELLIRENDERSETTINGS_H
|
||||
|
||||
//for unit testing
|
||||
class UnitTest;
|
||||
|
||||
/*!
|
||||
* \brief The IntelliRenderSettings class which manages the render Settings.
|
||||
*/
|
||||
class IntelliRenderSettings
|
||||
{
|
||||
friend UnitTest;
|
||||
public:
|
||||
IntelliRenderSettings();
|
||||
|
||||
/*!
|
||||
* \brief setFastRendering sets fastRendering to Updatedsetting.
|
||||
* \param Updatedsetting - Represents the new value for the Fast Rendering Flag.
|
||||
*/
|
||||
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() const;
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief fastRenderering the state of the project, in relation the the render setting.
|
||||
*/
|
||||
bool fastRenderering = true;
|
||||
};
|
||||
|
||||
#endif
|
||||
59
src/IntelliHelper/IntelliToolsettings.h.autosave
Normal file
59
src/IntelliHelper/IntelliToolsettings.h.autosave
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef INTELLITOOLSETTINGS_H
|
||||
#define INTELLITOOLSETTINGS_H
|
||||
|
||||
//for unit testing
|
||||
class UnitTest;
|
||||
/*!
|
||||
* \brief The IntelliToolsettings class managing the settings of the tools, independent of an existing tool.
|
||||
*/
|
||||
class IntelliToolsettings {
|
||||
friend UnitTest;
|
||||
public:
|
||||
/*!
|
||||
* \brief IntelliToolsettings - basic constructor of the IntelliToolsettings, initializing the basics.
|
||||
*/
|
||||
IntelliToolsettings();
|
||||
|
||||
/*!
|
||||
* \brief ~IntelliToolsettings - basic destructor.
|
||||
*/
|
||||
virtual ~IntelliToolsettings();
|
||||
|
||||
/*!
|
||||
* \brief getLineWidth returns the width attribute of the line.
|
||||
* \return returns the width attribute as integer.
|
||||
*/
|
||||
int getLineWidth() const;
|
||||
|
||||
/*!
|
||||
* \brief setLineWidth sets the width attribute of the line.
|
||||
* \param LineWidth - the future width of the line
|
||||
*/
|
||||
void setLineWidth(int LineWidth);
|
||||
|
||||
/*!
|
||||
* \brief getInnerAlpha returns the inner alpha value.
|
||||
* \return returns the inner alpha attribute as integer.
|
||||
*/
|
||||
int getInnerAlpha() const;
|
||||
|
||||
/*!
|
||||
* \brief setInnerAlpha sets the inner alpha attribute of the Tool.
|
||||
* \param innerAlpha - the future inner alpha of the Tool.
|
||||
*/
|
||||
void setInnerAlpha(int innerAlpha);
|
||||
|
||||
private:
|
||||
|
||||
/*!
|
||||
* \brief lineWidth attribute of a Tool.
|
||||
*/
|
||||
int lineWidth;
|
||||
|
||||
/*!
|
||||
* \brief innerAlpha aattribute of a Tool.
|
||||
*/
|
||||
int innerAlpha;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user