Ground-Truthing GUI 1.0

- Main Page
- Related Pages
- Classes
- Files

- File List

createfileabstraction.h
1
25 #ifndef CREATEFILEABSTRACTION
26 #define CREATEFILEABSTRACTION
27
28 #include <QFile>
29 #include <QFileInfo>
30
31 #include "image.h"
32 #include "fileabstraction.h"
33
34 class CreateFileAbstraction{
35
36 private:
37
38 // The file related to the image
39 FileAbstraction *file;
40
41 // The image
42 Image *image;
43
44 // The file path of the file containing all the information
45 QString filePath;
46
47 public:
48
53 CreateFileAbstraction(Image &image_1):image(&image_1){}
54
59 CreateFileAbstraction(QString filePath_1):filePath(filePath_1){
60 file=new FileAbstraction(filePath);
61 }
62
65 virtual ~CreateFileAbstraction(){}
66
70 virtual void createFile();
71
77 virtual QString removeExtension(QString filename_with_extension) const;
78
83 virtual FileAbstraction* getFile()const;
84
88 virtual Image* getImage()const;
89
95 virtual void setImage(Image *image_1);
96
102 virtual void setFile(FileAbstraction *file_1);
103
107 virtual bool fileExists()const;
108 };
109
110 #endif // CREATEFILEABSTRACTION
111
CreateFileAbstraction::CreateFileAbstraction
CreateFileAbstraction(QString filePath_1)
The second constructor of the CreateFileAbstraction class This constructor is called when the user op...
Definition: createfileabstraction.h:59
CreateFileAbstraction::~CreateFileAbstraction
virtual ~CreateFileAbstraction()
Class destructor.
Definition: createfileabstraction.h:65
CreateFileAbstraction
Creates a text file related to an image.
Definition: createfileabstraction.h:34
Image
Inherits the QPixmap class.
Definition: image.h:32
CreateFileAbstraction::fileExists
virtual bool fileExists() const
When the user opens an image, checks if a text file associated to this image already exists...
Definition: createfileabstraction.cpp:45
CreateFileAbstraction::CreateFileAbstraction
CreateFileAbstraction(Image &image_1)
The first constructor of the CreateFileAbstraction class This constructor is called when the user ope...
Definition: createfileabstraction.h:53
CreateFileAbstraction::setFile
virtual void setFile(FileAbstraction *file_1)
Set the text file.
Definition: createfileabstraction.cpp:41
CreateFileAbstraction::getFile
virtual FileAbstraction * getFile() const
Returns the text file associated to the image.
Definition: createfileabstraction.cpp:26
CreateFileAbstraction::removeExtension
virtual QString removeExtension(QString filename_with_extension) const
Removes the ".tiff" extension from the image filepath.
Definition: createfileabstraction.cpp:16
CreateFileAbstraction::createFile
virtual void createFile()
Creates the text file associated to the image.
Definition: createfileabstraction.cpp:4
CreateFileAbstraction::getImage
virtual Image * getImage() const
Returns the image to which the text file is associated.
Definition: createfileabstraction.cpp:31
FileAbstraction
Inherits the QFile class.
Definition: fileabstraction.h:27
CreateFileAbstraction::setImage
virtual void setImage(Image *image_1)
Set the image to which the text file is associated.
Definition: createfileabstraction.cpp:36