Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a41ef85
commit ab037d4
Showing
22 changed files
with
459 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (C) 2020 Damir Porobic <damir.porobic@gmx.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#include "AnnotationTabContent.h" | ||
|
||
namespace kImageAnnotator { | ||
|
||
AnnotationTabContent::AnnotationTabContent(const QPixmap &pixmap, Config *config, AbstractSettingsProvider *settingsProvider) : | ||
mAnnotationArea(new AnnotationArea(config, settingsProvider)), | ||
mAnnotationView(new AnnotationView(mAnnotationArea)), | ||
mMainLayout(new QHBoxLayout(this)) | ||
{ | ||
mAnnotationArea->loadImage(pixmap); | ||
mMainLayout->addWidget(mAnnotationView); | ||
setLayout(mMainLayout); | ||
} | ||
|
||
AnnotationTabContent::~AnnotationTabContent() | ||
{ | ||
delete mMainLayout; | ||
delete mAnnotationArea; | ||
delete mAnnotationView; | ||
} | ||
|
||
AnnotationArea* AnnotationTabContent::annotationArea() const | ||
{ | ||
return mAnnotationArea; | ||
} | ||
|
||
} // namespace kImageAnnotator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (C) 2020 Damir Porobic <damir.porobic@gmx.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
* Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef ANNOTATIONTAB_H | ||
#define ANNOTATIONTAB_H | ||
|
||
#include <QWidget> | ||
#include <QHBoxLayout> | ||
|
||
#include "AnnotationView.h" | ||
#include "AnnotationSettings.h" | ||
#include "src/annotations/core/AnnotationArea.h" | ||
|
||
namespace kImageAnnotator { | ||
|
||
class AnnotationTabContent : public QWidget | ||
{ | ||
Q_OBJECT | ||
public: | ||
AnnotationTabContent(const QPixmap &pixmap, Config *config, AbstractSettingsProvider *settingsProvider); | ||
~AnnotationTabContent() override; | ||
|
||
AnnotationArea* annotationArea() const; | ||
|
||
private: | ||
AnnotationArea *mAnnotationArea; | ||
AnnotationView *mAnnotationView; | ||
QHBoxLayout *mMainLayout; | ||
}; | ||
|
||
} // namespace kImageAnnotator | ||
|
||
#endif //ANNOTATIONTAB_H |
Oops, something went wrong.