-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from matwey/feature/flip
Flipping
- Loading branch information
Showing
8 changed files
with
178 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (C) 2017 Matwey V. Kornilov <[email protected]> | ||
* Konstantin Malanchev <[email protected]> | ||
* | ||
* 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 3 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 Lesser | ||
* 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, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef FLIPWIDGET_H | ||
#define FLIPWIDGET_H | ||
|
||
#include <QCheckBox> | ||
#include <QWidget> | ||
|
||
#include <memory> | ||
|
||
class FlipWidget: public QWidget { | ||
Q_OBJECT | ||
private: | ||
QCheckBox* h_flip_check_box_; | ||
QCheckBox* v_flip_check_box_; | ||
public: | ||
explicit FlipWidget(QWidget *parent = Q_NULLPTR); | ||
inline const QCheckBox* horizontalFlipCheckBox() const { return h_flip_check_box_; } | ||
inline const QCheckBox* verticalFlipCheckBox() const { return v_flip_check_box_; } | ||
|
||
public slots: | ||
inline void setHorizontalFlip(bool flipped) { h_flip_check_box_->setChecked(flipped); } | ||
inline void setVerticalFlip(bool flipped) { v_flip_check_box_->setChecked(flipped); } | ||
}; | ||
|
||
#endif //FLIPWIDGET_H |
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,33 @@ | ||
/* | ||
* Copyright (C) 2017 Matwey V. Kornilov <[email protected]> | ||
* Konstantin Malanchev <[email protected]> | ||
* | ||
* 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 3 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 Lesser | ||
* 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, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include <QVBoxLayout> | ||
|
||
#include <flipwidget.h> | ||
|
||
FlipWidget::FlipWidget(QWidget *parent): | ||
QWidget(parent), | ||
h_flip_check_box_(new QCheckBox(tr("Horizontal flipping"), this)), | ||
v_flip_check_box_(new QCheckBox(tr("Vertical flipping"), this)) { | ||
|
||
std::unique_ptr<QVBoxLayout> widget_layout{new QVBoxLayout(this)}; | ||
widget_layout->addWidget(h_flip_check_box_); | ||
widget_layout->addWidget(v_flip_check_box_); | ||
widget_layout->addStretch(1); | ||
setLayout(widget_layout.release()); | ||
} |
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