diff --git a/IHM_Retouche_Photo/IHM_Retouche_Photo.pro b/IHM_Retouche_Photo/IHM_Retouche_Photo.pro index 36f8a75bbeae2f115c1dfefa2906e6520aa33848..f57845cb2a1ef88bd266969d03528f5fe0f3b693 100644 --- a/IHM_Retouche_Photo/IHM_Retouche_Photo.pro +++ b/IHM_Retouche_Photo/IHM_Retouche_Photo.pro @@ -10,23 +10,15 @@ CONFIG += c++17 SOURCES += \ colorpickerwidget.cpp \ - dialog/rescaledialog.cpp \ - dialog/resizedialog.cpp \ main.cpp \ mainwindow.cpp \ tools/editable.cpp \ tools/hand.cpp \ - tools/selectionable/ellipse.cpp \ - tools/selectionable/polygone.cpp \ - tools/selectionable/rectangle.cpp \ - tools/selectionable/rectangleTriangle.cpp \ - tools/selectionable/triangle.cpp \ tools/selectionnable.cpp \ tools/tool.cpp \ ui/files/treefileselector.cpp \ ui/menu/displaymenulambda.cpp \ ui/menu/filemenulambda.cpp \ - ui/menu/imagemenulambda.cpp \ ui/menu/menubarmanager.cpp \ ui/toolbox/toolRegister.cpp \ ui/view/imagearea.cpp \ @@ -35,23 +27,15 @@ SOURCES += \ HEADERS += \ colorpickerwidget.h \ - dialog/rescaledialog.h \ - dialog/resizedialog.h \ mainwindow.h \ tools/editable.h \ tools/hand.h \ - tools/selectionable/ellipse.h \ - tools/selectionable/polygone.h \ - tools/selectionable/rectangle.h \ - tools/selectionable/rectangleTriangle.h \ - tools/selectionable/triangle.h \ tools/selectionnable.h \ tools/tool.h \ ui/files/fileselector.h \ ui/files/treefileselector.h \ ui/menu/displaymenulambda.h \ ui/menu/filemenulambda.h \ - ui/menu/imagemenulambda.h \ ui/menu/menubarmanager.h \ ui/toolbox/toolRegister.h \ ui/view/imagearea.h \ @@ -59,8 +43,6 @@ HEADERS += \ ui/view/viewmanager.h FORMS += \ - dialog/rescaledialog.ui \ - dialog/resizedialog.ui \ mainwindow.ui # Default rules for deployment. diff --git a/IHM_Retouche_Photo/dialog/rescaledialog.cpp b/IHM_Retouche_Photo/dialog/rescaledialog.cpp deleted file mode 100644 index b26b7821f70ca53575268c3ee4710198d4c3e4ee..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/dialog/rescaledialog.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "rescaledialog.h" - -namespace dialog { - ReScaleDialog::ReScaleDialog(ui::ViewManager * manager,bool defaultSize, QWidget * parent) - : QDialog(parent), _viewManager(manager) { - this->setupUi(this); - - this->_selectSizeButton->setChecked(defaultSize); - this->_selectPourcentButton->setChecked(!defaultSize); - - emit this->_selectSizeButton->toggled(defaultSize); - emit this->_selectPourcentButton->toggled(!defaultSize); - - QObject::connect(this, SIGNAL(accepted()), this, SLOT(apply())); - - this->_samplingCombobox->addItem(sampling::BILINIEAR); - this->_samplingCombobox->addItem(sampling::CLOSE_NEIGHBOR); - this->_samplingCombobox->setCurrentIndex(0); - this->setWindowTitle("Redimensionnement"); - } - - void ReScaleDialog::use() { - if(this->_viewManager != nullptr) { - ui::ImageArea * area = this->_viewManager->currentView(); - if(area != nullptr) { - this->_pourcentSpinbox->setValue(100); - this->_widthSpinbox->setValue(area->image().width()); - this->_heightSpinbox->setValue(area->image().height()); - this->show(); - } - } - } - - void ReScaleDialog::apply() { - ui::ImageArea * area = this->_viewManager->currentView(); - if(area != nullptr) { - Qt::TransformationMode mode = this->_samplingCombobox->currentText() == sampling::CLOSE_NEIGHBOR ? Qt::TransformationMode::FastTransformation : Qt::TransformationMode::SmoothTransformation; - QPoint resize = QPoint(0, 0); - if(this->usePourcent()) { - resize = QPoint( - area->image().width() * (static_cast<float>(this->getPourcentValue())/100), - area->image().height() * (static_cast<float>(this->getPourcentValue())/100) - ); - } - else if(this->useAbsoluteSize()) { - resize = this->getAbsoluteSizeValue(); - } - area->setScale(resize, mode); - } - } -} diff --git a/IHM_Retouche_Photo/dialog/rescaledialog.h b/IHM_Retouche_Photo/dialog/rescaledialog.h deleted file mode 100644 index 789615d27d0d897129f7e3fbdb04310f70dcb2ef..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/dialog/rescaledialog.h +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#include <QDialog> -#include "ui_rescaledialog.h" - -#include "ui/view/viewmanager.h" - -namespace dialog { - namespace sampling { - static const QString CLOSE_NEIGHBOR = "Proche Voisin"; - static const QString BILINIEAR = "Bilinéaire"; - } - - class ReScaleDialog : public QDialog, public Ui::ReScaleDialog { - Q_OBJECT - private: - ui::ViewManager * _viewManager; - - public: - ReScaleDialog(ui::ViewManager * ,bool defaultSize = true, QWidget *parent = nullptr); - - inline bool usePourcent() const {return this->_selectPourcentButton->isChecked();} - inline bool useAbsoluteSize() const {return this->_selectSizeButton->isChecked();} - - inline unsigned int getPourcentValue() const {return this->_pourcentSpinbox->value();} - inline QPoint getAbsoluteSizeValue() const {return QPoint(this->_widthSpinbox->value(), this->_heightSpinbox->value());} - - public slots: - void use(); - void apply(); - }; -} - diff --git a/IHM_Retouche_Photo/dialog/rescaledialog.ui b/IHM_Retouche_Photo/dialog/rescaledialog.ui deleted file mode 100644 index f1a5b77a6455e632d2136c0b0a7b816f409cd346..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/dialog/rescaledialog.ui +++ /dev/null @@ -1,337 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>ReScaleDialog</class> - <widget class="QDialog" name="ReScaleDialog"> - <property name="windowModality"> - <enum>Qt::WindowModal</enum> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>306</width> - <height>207</height> - </rect> - </property> - <property name="windowTitle"> - <string>Dialog</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>4</number> - </property> - <property name="topMargin"> - <number>4</number> - </property> - <property name="rightMargin"> - <number>4</number> - </property> - <property name="bottomMargin"> - <number>4</number> - </property> - <item> - <layout class="QHBoxLayout" name="_pourcentArea"> - <item> - <widget class="QRadioButton" name="_selectPourcentButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>En Pourcentage :</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="_pourcentSpinbox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="suffix"> - <string>%</string> - </property> - <property name="prefix"> - <string/> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>999999</number> - </property> - <property name="stepType"> - <enum>QAbstractSpinBox::AdaptiveDecimalStepType</enum> - </property> - <property name="value"> - <number>100</number> - </property> - <property name="displayIntegerBase"> - <number>10</number> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="_sizeArea"> - <property name="spacing"> - <number>10</number> - </property> - <property name="sizeConstraint"> - <enum>QLayout::SetDefaultConstraint</enum> - </property> - <item> - <widget class="QRadioButton" name="_selectSizeButton"> - <property name="text"> - <string>En Taille Absolue :</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="_heightArea"> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <item> - <widget class="QLabel" name="_heightLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Height </string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="_heightSpinbox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximum"> - <number>99999</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="_widthArea"> - <property name="leftMargin"> - <number>20</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <item> - <widget class="QLabel" name="_widthLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Width </string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="_widthSpinbox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximum"> - <number>99999</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="_samplingArea"> - <item> - <widget class="QLabel" name="_samplingLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Ré-Chantillionage :</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="_samplingCombobox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="_exitArea"> - <item> - <spacer name="_exitSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="_validatePushButton"> - <property name="text"> - <string>Valider</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="_cancelPushButton"> - <property name="text"> - <string>Annuler</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - <resources/> - <connections> - <connection> - <sender>_selectSizeButton</sender> - <signal>toggled(bool)</signal> - <receiver>_heightSpinbox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel"> - <x>89</x> - <y>104</y> - </hint> - <hint type="destinationlabel"> - <x>83</x> - <y>140</y> - </hint> - </hints> - </connection> - <connection> - <sender>_selectSizeButton</sender> - <signal>toggled(bool)</signal> - <receiver>_widthSpinbox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel"> - <x>249</x> - <y>104</y> - </hint> - <hint type="destinationlabel"> - <x>233</x> - <y>177</y> - </hint> - </hints> - </connection> - <connection> - <sender>_selectPourcentButton</sender> - <signal>toggled(bool)</signal> - <receiver>_pourcentSpinbox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel"> - <x>81</x> - <y>53</y> - </hint> - <hint type="destinationlabel"> - <x>182</x> - <y>54</y> - </hint> - </hints> - </connection> - <connection> - <sender>_validatePushButton</sender> - <signal>released()</signal> - <receiver>ReScaleDialog</receiver> - <slot>accept()</slot> - <hints> - <hint type="sourcelabel"> - <x>218</x> - <y>213</y> - </hint> - <hint type="destinationlabel"> - <x>310</x> - <y>206</y> - </hint> - </hints> - </connection> - <connection> - <sender>_cancelPushButton</sender> - <signal>clicked()</signal> - <receiver>ReScaleDialog</receiver> - <slot>close()</slot> - <hints> - <hint type="sourcelabel"> - <x>304</x> - <y>213</y> - </hint> - <hint type="destinationlabel"> - <x>254</x> - <y>168</y> - </hint> - </hints> - </connection> - </connections> -</ui> diff --git a/IHM_Retouche_Photo/dialog/resizedialog.cpp b/IHM_Retouche_Photo/dialog/resizedialog.cpp deleted file mode 100644 index 88363a6ab92b39c68ad923a240417385e8d372c5..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/dialog/resizedialog.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "resizedialog.h" - -namespace dialog { - ReSizeDialog::ReSizeDialog(ui::ViewManager * manager, QWidget * parent) - : QDialog(parent), _viewManager(manager) { - this->setupUi(this); - - QObject::connect(this, SIGNAL(accepted()), this, SLOT(apply())); - - this->setWindowTitle("Rognage"); - } - - void ReSizeDialog::use() { - if(this->_viewManager != nullptr) { - ui::ImageArea * area = this->_viewManager->currentView(); - if(area != nullptr) { - this->_xSpinbox->setValue(0); - this->_ySpinbox->setValue(0); - this->_widthSpinbox->setValue(area->image().width()); - this->_heightSpinbox->setValue(area->image().height()); - this->show(); - } - } - } - - void ReSizeDialog::apply() { - ui::ImageArea * area = this->_viewManager->currentView(); - if(area != nullptr) { - area->setSize(this->getAnchor(), this->getSize()); - } - } -} diff --git a/IHM_Retouche_Photo/dialog/resizedialog.h b/IHM_Retouche_Photo/dialog/resizedialog.h deleted file mode 100644 index 82761a1af2b12be1920e6172d3ed1264f46a8d56..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/dialog/resizedialog.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include <QDialog> -#include "ui_resizedialog.h" - -#include "ui/view/viewmanager.h" - -namespace dialog { - class ReSizeDialog : public QDialog, public Ui::ReSizeDialog { - Q_OBJECT - private: - ui::ViewManager * _viewManager; - - public: - ReSizeDialog(ui::ViewManager *, QWidget * parent = nullptr); - - inline QPoint getAnchor() const {return QPoint(this->_xSpinbox->value(), this->_ySpinbox->value());} - inline QPoint getSize() const {return QPoint(this->_widthSpinbox->value(), this->_heightSpinbox->value());} - - public slots: - void use(); - void apply(); - }; -} - diff --git a/IHM_Retouche_Photo/dialog/resizedialog.ui b/IHM_Retouche_Photo/dialog/resizedialog.ui deleted file mode 100644 index fb29c97693e8ec657066d28d75621f0f5fb7eb69..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/dialog/resizedialog.ui +++ /dev/null @@ -1,289 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>ReSizeDialog</class> - <widget class="QDialog" name="ReSizeDialog"> - <property name="windowModality"> - <enum>Qt::WindowModal</enum> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>330</width> - <height>177</height> - </rect> - </property> - <property name="windowTitle"> - <string>Dialog</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>4</number> - </property> - <property name="topMargin"> - <number>4</number> - </property> - <property name="rightMargin"> - <number>4</number> - </property> - <property name="bottomMargin"> - <number>4</number> - </property> - <item> - <layout class="QVBoxLayout" name="_sizeArea"> - <property name="spacing"> - <number>0</number> - </property> - <property name="sizeConstraint"> - <enum>QLayout::SetDefaultConstraint</enum> - </property> - <property name="bottomMargin"> - <number>16</number> - </property> - <item> - <layout class="QVBoxLayout" name="_anchorArea"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <item> - <widget class="QLabel" name="_anchorLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Anchor :</string> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="_xArea"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <item> - <widget class="QLabel" name="_xlabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>x :</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="_xSpinbox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximum"> - <number>99999999</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="_yArea"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <item> - <widget class="QLabel" name="_yLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>y :</string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="_ySpinbox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximum"> - <number>99999999</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="_heightArea"> - <property name="leftMargin"> - <number>16</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <item> - <widget class="QLabel" name="_heightLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Height </string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="_heightSpinbox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximum"> - <number>99999</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="_widthArea"> - <property name="leftMargin"> - <number>20</number> - </property> - <property name="rightMargin"> - <number>16</number> - </property> - <item> - <widget class="QLabel" name="_widthLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Width </string> - </property> - </widget> - </item> - <item> - <widget class="QSpinBox" name="_widthSpinbox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximum"> - <number>99999</number> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="_exitArea"> - <item> - <spacer name="_exitSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="_validatePushButton"> - <property name="text"> - <string>Valider</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="_cancelPushButton"> - <property name="text"> - <string>Annuler</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - <resources/> - <connections> - <connection> - <sender>_validatePushButton</sender> - <signal>released()</signal> - <receiver>ReSizeDialog</receiver> - <slot>accept()</slot> - <hints> - <hint type="sourcelabel"> - <x>218</x> - <y>213</y> - </hint> - <hint type="destinationlabel"> - <x>310</x> - <y>206</y> - </hint> - </hints> - </connection> - <connection> - <sender>_cancelPushButton</sender> - <signal>clicked()</signal> - <receiver>ReSizeDialog</receiver> - <slot>close()</slot> - <hints> - <hint type="sourcelabel"> - <x>304</x> - <y>213</y> - </hint> - <hint type="destinationlabel"> - <x>254</x> - <y>168</y> - </hint> - </hints> - </connection> - </connections> -</ui> diff --git a/IHM_Retouche_Photo/mainwindow.cpp b/IHM_Retouche_Photo/mainwindow.cpp index f7ca741d8d8d0c6d18ee2dacd67acfdf6e8a7037..71f075aff11ae0d780fd1e2b8dbcf613c1fae342 100644 --- a/IHM_Retouche_Photo/mainwindow.cpp +++ b/IHM_Retouche_Photo/mainwindow.cpp @@ -12,16 +12,10 @@ #include <ui/menu/filemenulambda.h> #include <ui/menu/displaymenulambda.h> -#include <ui/menu/imagemenulambda.h> #include <ui/files/treefileselector.h> #include <tools/hand.h> -#include <tools/selectionable/rectangle.h> -#include <tools/selectionable/rectangleTriangle.h> -#include <tools/selectionable/triangle.h> -#include <tools/selectionable/ellipse.h> -#include <tools/selectionable/polygone.h> MainWindow::MainWindow(QWidget * parent) : QMainWindow(parent), _toolRegister(), _fileselectorManager(nullptr), _viewManager(nullptr) { @@ -38,54 +32,37 @@ MainWindow::MainWindow(QWidget * parent) QObject::connect(this->_remove_selectable_element, SIGNAL(released()), this->_fileselectorManager, SLOT(removeSelectedItem())); QObject::connect(this->_add_selectable_element, SIGNAL(released()), this->_fileselectorManager, SLOT(pushItem())); - qDebug() << "Mark_2"; + ColorWindow = findChild<QPushButton*>("ColorWindow"); - ColorWindow = this->_colorPicker; + // Connect the button's clicked signal to the openColorPicker slot + connect(ColorWindow, &QPushButton::clicked, this, &MainWindow::openColorPicker); + // Create an action for Ctrl+C + ctrlCAction = new QAction(this); + ctrlCAction->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_C)); // Change the shortcut + connect(ctrlCAction, &QAction::triggered, this, &MainWindow::handleCtrlCKey); + addAction(ctrlCAction); - // Connect the button's clicked signal to the openColorPicker slot - connect(ColorWindow, &QPushButton::clicked, this, &MainWindow::openColorPicker); - // Create an action for Ctrl+C - ctrlCAction = new QAction(this); - ctrlCAction->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_C)); // Change the shortcut - connect(ctrlCAction, &QAction::triggered, this, &MainWindow::handleCtrlCKey); - addAction(ctrlCAction); + qDebug() << "Mark_2"; - qDebug() << "Mark_3"; this->_viewManager = new ui::ViewManager(this->_fileselectorManager, this->_imageTabs); - qDebug() << "Mark_4"; - - this->_rescaleDialog = new dialog::ReScaleDialog(this->_viewManager); - QObject::connect(this->_rescaleButton, SIGNAL(released()), this->_rescaleDialog, SLOT(use())); - - this->_resizeDialog = new dialog::ReSizeDialog(this->_viewManager); - QObject::connect(this->_resizeButton, SIGNAL(released()), this->_resizeDialog, SLOT(use())); - - qDebug() << "Mark_5"; - + qDebug() << "Mark_3"; this->_toolRegister.setToolbox(this->_toolbox); this->_toolRegister.setViewManager(this->_viewManager); this->_toolRegister.push_back(QSharedPointer<tool::Tool>(new tool::Hand())); - this->_toolRegister.push_back(QSharedPointer<tool::Rectangle>(new tool::Rectangle())); - this->_toolRegister.push_back(QSharedPointer<tool::RectangleTriangle>(new tool::RectangleTriangle())); - this->_toolRegister.push_back(QSharedPointer<tool::Triangle>(new tool::Triangle())); - this->_toolRegister.push_back(QSharedPointer<tool::Ellipse>(new tool::Ellipse())); - this->_toolRegister.push_back(QSharedPointer<tool::Polygone>(new tool::Polygone())); this->_toolRegister.update(); - qDebug() << "Mark_6"; + qDebug() << "Mark_4"; this->_menubarManager.insert(this->_menuFile, QSharedPointer<ui::MenuLambda>(new ui::FilemenuLambda(this->_fileselectorManager, this->_viewManager))); this->_menubarManager.insert(this->_menuAffichage, QSharedPointer<ui::MenuLambda>(new ui::DisplayMenuLambda(this->_viewManager))); - this->_menubarManager.insert(this->_menuImage, QSharedPointer<ui::MenuLambda>(new ui::imagemenulambda(this->_rescaleDialog, this->_resizeDialog, this->_viewManager))); - this->_menubarManager.update(); - qDebug() << "Mark_7"; + qDebug() << "Mark_5"; } void MainWindow::dragEnterEvent(QDragEnterEvent *e) { @@ -110,7 +87,5 @@ void MainWindow::handleCtrlCKey() MainWindow::~MainWindow() { delete this->_fileselectorManager; delete this->_viewManager; - delete this->_rescaleDialog; - delete this->_resizeDialog; } diff --git a/IHM_Retouche_Photo/mainwindow.h b/IHM_Retouche_Photo/mainwindow.h index 1f7bc7d08ce9bdea1682fa5a6633e604936843f0..afb140341c28b7472becf200a49778c999ac0ec4 100644 --- a/IHM_Retouche_Photo/mainwindow.h +++ b/IHM_Retouche_Photo/mainwindow.h @@ -9,10 +9,6 @@ #include "ui/menu/menubarmanager.h" #include "ui/files/fileselector.h" #include "ui/view/viewmanager.h" - -#include "dialog/rescaledialog.h" -#include "dialog/resizedialog.h" - #include <colorpickerwidget.h> class QAction; @@ -33,6 +29,9 @@ class MainWindow : public QMainWindow, private Ui::MainWindow { virtual void dropEvent(QDropEvent * e); virtual void dragEnterEvent(QDragEnterEvent *e); +private slots: + void openColorPicker(); // Slot to open the ColorPickerWidget + void handleCtrlCKey(); // New slot for Ctrl+C private: ColorPickerWidget colorPickerWidget; // Declare ColorPickerWidget as a private member diff --git a/IHM_Retouche_Photo/mainwindow.ui b/IHM_Retouche_Photo/mainwindow.ui index 83b29f41b2616f90aa0032dbfad33a0561b01b03..3efbe751cad2f3a5ad4746fde7a11495a13e71b3 100644 --- a/IHM_Retouche_Photo/mainwindow.ui +++ b/IHM_Retouche_Photo/mainwindow.ui @@ -162,7 +162,7 @@ </property> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/list-add.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/list-add.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/list-add.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/list-add.png</iconset> </property> <property name="shortcut"> <string>Ins</string> @@ -198,7 +198,7 @@ </property> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/list-remove.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/list-remove.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/list-remove.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/list-remove.png</iconset> </property> <property name="shortcut"> <string>Del</string> @@ -265,7 +265,7 @@ </property> <widget class="QWidget" name="_imageTabs_1"> <attribute name="icon"> - <iconset> + <iconset resource="ressource.qrc"> <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/preferences-system.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/preferences-system.png</iconset> </attribute> <attribute name="title"> @@ -319,89 +319,10 @@ <property name="spacing"> <number>0</number> </property> - <item> - <layout class="QHBoxLayout" name="_globalTool"> - <property name="spacing"> - <number>0</number> - </property> - <item> - <widget class="QPushButton" name="_colorPicker"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/64x64/ressource/image/oxygen/icons/64x64/preferences-desktop-color.png</normaloff>:/oxygen/64x64/ressource/image/oxygen/icons/64x64/preferences-desktop-color.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>32</width> - <height>32</height> - </size> - </property> - <property name="flat"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="_rescaleButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/64x64/ressource/image/oxygen/icons/64x64/transform-scale.png</normaloff>:/oxygen/64x64/ressource/image/oxygen/icons/64x64/transform-scale.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>32</width> - <height>32</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="_resizeButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/64x64/ressource/image/oxygen/icons/64x64/transform-crop-and-resize.png</normaloff>:/oxygen/64x64/ressource/image/oxygen/icons/64x64/transform-crop-and-resize.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>32</width> - <height>32</height> - </size> - </property> - </widget> - </item> - </layout> - </item> <item> <widget class="QListWidget" name="_toolbox"> <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Expanding"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -452,7 +373,7 @@ <x>0</x> <y>0</y> <width>1026</width> - <height>21</height> + <height>22</height> </rect> </property> <widget class="QMenu" name="_menuFile"> @@ -494,7 +415,7 @@ </property> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/align-none.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/align-none.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/align-none.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/align-none.png</iconset> </property> <addaction name="_action_turn_verticaly"/> <addaction name="_action_turn_horizonaly"/> @@ -505,13 +426,15 @@ </property> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-rotate.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-rotate.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-rotate.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-rotate.png</iconset> </property> <addaction name="_action_rotate_left_90"/> <addaction name="_action_rotate_right_90"/> + <addaction name="_action_rotate_180"/> </widget> <addaction name="_action_trim"/> <addaction name="_action_resize"/> + <addaction name="_action_rezise_draw_area"/> <addaction name="separator"/> <addaction name="_menuTurn"/> <addaction name="_menuRotate"/> @@ -578,7 +501,7 @@ <action name="_action_new"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-new.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-new.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-new.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-new.png</iconset> </property> <property name="text"> <string>Nouveau...</string> @@ -593,7 +516,7 @@ <action name="_action_open"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-open.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-open.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-open.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-open.png</iconset> </property> <property name="text"> <string>Ouvrir...</string> @@ -618,7 +541,7 @@ <action name="_action_save"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-save.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-save.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-save.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-save.png</iconset> </property> <property name="text"> <string>Enregistrer</string> @@ -633,7 +556,7 @@ <action name="_action_saveAs"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-save-all.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-save-all.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-save-as.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-save-as.png</iconset> </property> <property name="text"> <string>Enregistrer sous...</string> @@ -648,7 +571,7 @@ <action name="_action_saveAll"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-save-as.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-save-as.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-save-all.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-save-all.png</iconset> </property> <property name="text"> <string>Enregistrer tout</string> @@ -663,7 +586,7 @@ <action name="_action_close"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-close.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-close.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-close.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-close.png</iconset> </property> <property name="text"> <string>Fermer</string> @@ -681,7 +604,7 @@ <action name="_action_quit"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/dialog-close.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/dialog-close.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/dialog-close.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/dialog-close.png</iconset> </property> <property name="text"> <string>Quitter</string> @@ -699,7 +622,7 @@ <action name="_action_undo"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-undo.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-undo.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-undo.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-undo.png</iconset> </property> <property name="text"> <string>Annuler</string> @@ -714,7 +637,7 @@ <action name="_action_redo"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-redo.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-redo.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-redo.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-redo.png</iconset> </property> <property name="text"> <string>Répéter</string> @@ -729,7 +652,7 @@ <action name="_action_cut"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-cut.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-cut.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-cut.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-cut.png</iconset> </property> <property name="text"> <string>Couper</string> @@ -744,7 +667,7 @@ <action name="_action_copy"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-copy.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-copy.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-copy.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-copy.png</iconset> </property> <property name="text"> <string>Copier</string> @@ -759,7 +682,7 @@ <action name="_action_paste"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-paste.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-paste.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-paste.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-paste.png</iconset> </property> <property name="text"> <string>Coller</string> @@ -773,7 +696,7 @@ </action> <action name="_action_delete"> <property name="icon"> - <iconset> + <iconset resource="ressource.qrc"> <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-delete.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-delete.png</iconset> </property> <property name="text"> @@ -789,7 +712,7 @@ <action name="_action_zoom_in"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/image-zoom-in.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/image-zoom-in.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/zoom-in.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/zoom-in.png</iconset> </property> <property name="text"> <string>Zoom avant</string> @@ -804,7 +727,7 @@ <action name="_action_zoom_out"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/image-zoom-out.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/image-zoom-out.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/zoom-out.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/zoom-out.png</iconset> </property> <property name="text"> <string>Zoom arrière</string> @@ -819,7 +742,7 @@ <action name="_action_del"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-clear-locationbar-rtl.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/edit-clear-locationbar-rtl.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-clear-locationbar-rtl.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/edit-clear-locationbar-rtl.png</iconset> </property> <property name="text"> <string>Supprimer</string> @@ -834,7 +757,7 @@ <action name="_action_credit"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/system-help.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/system-help.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/help-browser.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/help-browser.png</iconset> </property> <property name="text"> <string>Aide</string> @@ -849,7 +772,7 @@ <action name="_action_propos"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/documentinfo.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/documentinfo.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/documentinfo.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/documentinfo.png</iconset> </property> <property name="text"> <string>À propos</string> @@ -858,7 +781,7 @@ <action name="_action_trim"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-crop-and-resize.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-crop-and-resize.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-crop-and-resize.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-crop-and-resize.png</iconset> </property> <property name="text"> <string>Rogner</string> @@ -873,7 +796,7 @@ <action name="_action_resize"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-scale.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-scale.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-scale.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-scale.png</iconset> </property> <property name="text"> <string>Redimensionner...</string> @@ -888,7 +811,7 @@ <action name="_action_rezise_draw_area"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-crop.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-crop.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-crop.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-crop.png</iconset> </property> <property name="text"> <string>Changer la taille de la zone de dessin...</string> @@ -903,7 +826,7 @@ <action name="_action_turn_verticaly"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/align-horizontal-center.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/align-horizontal-center.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/align-horizontal-center.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/align-horizontal-center.png</iconset> </property> <property name="text"> <string>Verticalement</string> @@ -915,7 +838,7 @@ <action name="_action_turn_horizonaly"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/align-vertical-center.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/align-vertical-center.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/align-vertical-center.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/align-vertical-center.png</iconset> </property> <property name="text"> <string>Horizontalement</string> @@ -927,7 +850,7 @@ <action name="_action_rotate_left_90"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/object-rotate-left.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/object-rotate-left.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/object-rotate-left.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/object-rotate-left.png</iconset> </property> <property name="text"> <string>Faire pivoter vers la gauche de 90°</string> @@ -942,7 +865,7 @@ <action name="_action_rotate_right_90"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/object-rotate-right.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/object-rotate-right.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/object-rotate-right.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/object-rotate-right.png</iconset> </property> <property name="text"> <string>Faire pivoter vers la droite de 90°</string> @@ -957,7 +880,7 @@ <action name="_action_rotate_180"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-rotate.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-rotate.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-rotate.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-rotate.png</iconset> </property> <property name="text"> <string>Faire Pivoter de 180°</string> @@ -969,7 +892,7 @@ <action name="_action_openDirectory"> <property name="icon"> <iconset resource="ressource.qrc"> - <normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-open-folder.png</normaloff>:/oxygen/16x16/ressource/image/oxygen/icons/16x16/document-open-folder.png</iconset> + <normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-open-folder.png</normaloff>:/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/document-open-folder.png</iconset> </property> <property name="text"> <string>Ouvrir répertoire...</string> diff --git a/IHM_Retouche_Photo/ressource.qrc b/IHM_Retouche_Photo/ressource.qrc index 16c0a8bfc2643bb3595f361a5a874a2872172a36..f3805d468ffceba2e3efd85fda2806125eda4eb9 100644 --- a/IHM_Retouche_Photo/ressource.qrc +++ b/IHM_Retouche_Photo/ressource.qrc @@ -1,5 +1,5 @@ <RCC> - <qresource prefix="/test/16x16"> + <qresource prefix="/image/test/icons/16x16"> <file>ressource/image/test/icons/16x16/Circle.png</file> <file>ressource/image/test/icons/16x16/Cube.png</file> <file>ressource/image/test/icons/16x16/Diamond.png</file> @@ -9,7 +9,7 @@ <file>ressource/image/test/icons/16x16/Star.png</file> <file>ressource/image/test/icons/16x16/Triangle.png</file> </qresource> - <qresource prefix="/oxygen/16x16"> + <qresource prefix="/image/oxygen/icons/16x16"> <file>ressource/image/oxygen/icons/16x16/document-close.png</file> <file>ressource/image/oxygen/icons/16x16/document-new.png</file> <file>ressource/image/oxygen/icons/16x16/document-open.png</file> @@ -415,64 +415,6 @@ <file>ressource/image/oxygen/icons/16x16/zoom-previous.png</file> <file>ressource/image/oxygen/icons/16x16/zoom-select.png</file> <file>ressource/image/oxygen/icons/16x16/align-none.png</file> - <file>ressource/image/oxygen/icons/16x16/actions-fill-color-icon.png</file> </qresource> <qresource prefix="/stylesheet"/> - <qresource prefix="/oxygen/64x64"> - <file>ressource/image/oxygen/icons/64x64/application-exit.png</file> - <file>ressource/image/oxygen/icons/64x64/calligraflow.png</file> - <file>ressource/image/oxygen/icons/64x64/chronometer.png</file> - <file>ressource/image/oxygen/icons/64x64/configure.png</file> - <file>ressource/image/oxygen/icons/64x64/continue-data-project.png</file> - <file>ressource/image/oxygen/icons/64x64/dialog-ok.png</file> - <file>ressource/image/oxygen/icons/64x64/dialog-ok-apply.png</file> - <file>ressource/image/oxygen/icons/64x64/document-edit.png</file> - <file>ressource/image/oxygen/icons/64x64/document-preview.png</file> - <file>ressource/image/oxygen/icons/64x64/document-preview-archive.png</file> - <file>ressource/image/oxygen/icons/64x64/edit-bomb.png</file> - <file>ressource/image/oxygen/icons/64x64/edit-find.png</file> - <file>ressource/image/oxygen/icons/64x64/edit-paste.png</file> - <file>ressource/image/oxygen/icons/64x64/go-bottom.png</file> - <file>ressource/image/oxygen/icons/64x64/go-down.png</file> - <file>ressource/image/oxygen/icons/64x64/go-first.png</file> - <file>ressource/image/oxygen/icons/64x64/go-first-view-page.png</file> - <file>ressource/image/oxygen/icons/64x64/go-last.png</file> - <file>ressource/image/oxygen/icons/64x64/go-last-view-page.png</file> - <file>ressource/image/oxygen/icons/64x64/go-next.png</file> - <file>ressource/image/oxygen/icons/64x64/go-next-view-page.png</file> - <file>ressource/image/oxygen/icons/64x64/go-previous.png</file> - <file>ressource/image/oxygen/icons/64x64/go-previous-view-page.png</file> - <file>ressource/image/oxygen/icons/64x64/go-top.png</file> - <file>ressource/image/oxygen/icons/64x64/go-up.png</file> - <file>ressource/image/oxygen/icons/64x64/insert-horizontal-rule.png</file> - <file>ressource/image/oxygen/icons/64x64/insert-link.png</file> - <file>ressource/image/oxygen/icons/64x64/kcolorchooser.png</file> - <file>ressource/image/oxygen/icons/64x64/list-remove.png</file> - <file>ressource/image/oxygen/icons/64x64/mail-receive.png</file> - <file>ressource/image/oxygen/icons/64x64/preferences-desktop-color.png</file> - <file>ressource/image/oxygen/icons/64x64/preferences-system.png</file> - <file>ressource/image/oxygen/icons/64x64/roll.png</file> - <file>ressource/image/oxygen/icons/64x64/system-log-out.png</file> - <file>ressource/image/oxygen/icons/64x64/system-reboot.png</file> - <file>ressource/image/oxygen/icons/64x64/system-run.png</file> - <file>ressource/image/oxygen/icons/64x64/system-search.png</file> - <file>ressource/image/oxygen/icons/64x64/system-shutdown.png</file> - <file>ressource/image/oxygen/icons/64x64/system-suspend.png</file> - <file>ressource/image/oxygen/icons/64x64/system-suspend-hibernate.png</file> - <file>ressource/image/oxygen/icons/64x64/system-switch-user.png</file> - <file>ressource/image/oxygen/icons/64x64/tool-animator.png</file> - <file>ressource/image/oxygen/icons/64x64/tools-media-optical-burn.png</file> - <file>ressource/image/oxygen/icons/64x64/tools-media-optical-burn-image.png</file> - <file>ressource/image/oxygen/icons/64x64/tools-media-optical-erase.png</file> - <file>ressource/image/oxygen/icons/64x64/tools-media-optical-format.png</file> - <file>ressource/image/oxygen/icons/64x64/tools-report-bug.png</file> - <file>ressource/image/oxygen/icons/64x64/tools-rip-audio-cd.png</file> - <file>ressource/image/oxygen/icons/64x64/tools-rip-video-cd.png</file> - <file>ressource/image/oxygen/icons/64x64/tools-rip-video-dvd.png</file> - <file>ressource/image/oxygen/icons/64x64/tools-wizard.png</file> - <file>ressource/image/oxygen/icons/64x64/transform-crop-and-resize.png</file> - <file>ressource/image/oxygen/icons/64x64/transform-move.png</file> - <file>ressource/image/oxygen/icons/64x64/transform-scale.png</file> - <file>ressource/image/oxygen/icons/64x64/view-conversation-balloon.png</file> - </qresource> </RCC> diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/16x16/actions-fill-color-icon.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/16x16/actions-fill-color-icon.png deleted file mode 100644 index 90a88f78c2821a6fd49f81ccfc220da6d65dcaf9..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/16x16/actions-fill-color-icon.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/16x16/document-swap.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/16x16/document-swap.png deleted file mode 100644 index a14c71ecc3013c224804626f46ebddb87ea2125c..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/16x16/document-swap.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/32x32/document-close.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/32x32/document-close.png deleted file mode 100644 index 23b094754e0a5eb1163d6eea49bbf46df993e00c..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/32x32/document-close.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/32x32/document-new.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/32x32/document-new.png deleted file mode 100644 index 3d0f5cc1d53daab4519aade073a1499cfb39a14c..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/32x32/document-new.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/32x32/document-open.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/32x32/document-open.png deleted file mode 100644 index 8ba54411cf72cc4ed726715b173e815938796833..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/32x32/document-open.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/48x48/document-close.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/48x48/document-close.png deleted file mode 100644 index c81571476c81c030918df2e77051a9f8e53a3661..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/48x48/document-close.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/48x48/document-new.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/48x48/document-new.png deleted file mode 100644 index 61db97ae49ca9bd542c685c973df94e0e0daa460..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/48x48/document-new.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/48x48/document-open.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/48x48/document-open.png deleted file mode 100644 index 3432ed279e6ebf1d590f5a8f60cdac0d056b3125..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/48x48/document-open.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/application-exit.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/application-exit.png deleted file mode 100644 index c1549f499e0aa456b2a721e25352171a7ad3d2b9..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/application-exit.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/calligraflow.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/calligraflow.png deleted file mode 100644 index 0a3170139c84f1e26b91550bffa702def23ddd61..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/calligraflow.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/chronometer.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/chronometer.png deleted file mode 100644 index d38511ca5a77d037a83030f11cfee59d9b5f45b5..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/chronometer.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/configure.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/configure.png deleted file mode 100644 index 79f92de26e3172660639190e37978c6b84233bb2..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/configure.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/continue-data-project.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/continue-data-project.png deleted file mode 100644 index 3374e90a2577471eb205e3be397bdb106c49b623..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/continue-data-project.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/dialog-ok-apply.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/dialog-ok-apply.png deleted file mode 100644 index 01334d037c2ff1728695bc44a5b05c34d0a7e570..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/dialog-ok-apply.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/dialog-ok.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/dialog-ok.png deleted file mode 100644 index c8bc2353bb6029b34f33642e435f6970508c947e..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/dialog-ok.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/document-edit.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/document-edit.png deleted file mode 100644 index a0ec6b7dfda74ee9722eceb37d45278b7e1d110d..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/document-edit.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/document-preview-archive.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/document-preview-archive.png deleted file mode 100644 index 456e1cdbcbfd6d3095e78c6471e66ab4681af85c..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/document-preview-archive.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/document-preview.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/document-preview.png deleted file mode 100644 index 9bae3d8d5a47f879d37aa9d2a3d5c194d1bb9800..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/document-preview.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/edit-bomb.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/edit-bomb.png deleted file mode 100644 index 841c59b151403c8472fd20391b35df0e8195f1c7..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/edit-bomb.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/edit-find.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/edit-find.png deleted file mode 100644 index 884bd5fec802794b8f418c13dc9dc6613d509c9a..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/edit-find.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/edit-paste.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/edit-paste.png deleted file mode 100644 index e804c9007768f230eab5933bfd2806ac6968b388..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/edit-paste.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-bottom.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-bottom.png deleted file mode 100644 index 7a9684097adbbd2c0c97c3aa05329996a3780aa8..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-bottom.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-down.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-down.png deleted file mode 100644 index c23774b63eab57fa4e3a2bfa67041270d7b2f5eb..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-down.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-first-view-page.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-first-view-page.png deleted file mode 100644 index e6d11767a1b669d0d25caadc119b2a9de0753643..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-first-view-page.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-first.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-first.png deleted file mode 100644 index aea78165e4c21a69a9da1fd5507f6f622f90f1b6..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-first.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-last-view-page.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-last-view-page.png deleted file mode 100644 index 12d0c1031c35caaaa5b8197860209345eb84a084..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-last-view-page.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-last.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-last.png deleted file mode 100644 index eb088a950a742fe52341d7cd8d11e4bb1904ed81..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-last.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-next-view-page.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-next-view-page.png deleted file mode 100644 index 132ee722afd80e0e8f05f4a1543c2f29a2a37392..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-next-view-page.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-next.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-next.png deleted file mode 100644 index 31b2a6bb5c90d314f7f15bf44ad4c4da40823352..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-next.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-previous-view-page.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-previous-view-page.png deleted file mode 100644 index e9ad176b678028874202e15645ad5ff8bb280428..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-previous-view-page.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-previous.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-previous.png deleted file mode 100644 index f53d410fb3d36a93452d9285349fba3e0ac7e872..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-previous.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-top.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-top.png deleted file mode 100644 index 2a2df9c7044e7d67621d759463f22c1efc843a6f..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-top.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-up.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-up.png deleted file mode 100644 index e44c37a92b10a39144008b5e88281ca07fe2bfe6..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/go-up.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/insert-horizontal-rule.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/insert-horizontal-rule.png deleted file mode 100644 index a92c0cb512a5803fbe9d1e3567cc9d05925193d4..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/insert-horizontal-rule.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/insert-link.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/insert-link.png deleted file mode 100644 index 9fd175e5b82a8b989b7d25d0b58e4cf5dac854a0..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/insert-link.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/kcolorchooser.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/kcolorchooser.png deleted file mode 100644 index 69cdb99706ea5f7d7e1fcad9855f13c19a779ba8..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/kcolorchooser.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/list-remove.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/list-remove.png deleted file mode 100644 index 13904d1cf9a1aefd7cee8feea3294811829aa525..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/list-remove.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/mail-receive.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/mail-receive.png deleted file mode 100644 index bf2879b630d21ee22777b55470a08930fc1b3a48..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/mail-receive.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/preferences-desktop-color.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/preferences-desktop-color.png deleted file mode 100644 index 697e52503589c8a7a52a52c853573d0381d07e86..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/preferences-desktop-color.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/preferences-system.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/preferences-system.png deleted file mode 100644 index 9ea5cec4472df7f11ead994b9a3248251f38bdc7..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/preferences-system.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/roll.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/roll.png deleted file mode 100644 index fe90cc60c7f88db7be0abe3094cfe2afc3b8fca7..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/roll.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-log-out.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-log-out.png deleted file mode 100644 index 9f44fd0ef916610a15efbdf654beecced4e429ca..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-log-out.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-reboot.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-reboot.png deleted file mode 100644 index b46fd7f20388ce7b8b66679dd4776cd194f033b1..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-reboot.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-run.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-run.png deleted file mode 100644 index dbb069a9e8cef752d7cfad8412d3166d71575726..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-run.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-search.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-search.png deleted file mode 100644 index ba147e3590f996f18e9ee0b8930a13976989fc3c..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-search.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-shutdown.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-shutdown.png deleted file mode 100644 index b4154a5df57192df84947ff01a3e92469b51d6e7..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-shutdown.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-suspend-hibernate.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-suspend-hibernate.png deleted file mode 100644 index 6df89cea94303eab0ccc43278084ff173f489ce5..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-suspend-hibernate.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-suspend.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-suspend.png deleted file mode 100644 index 010a0c27805034092a158b870d48f3ca61ad7a8b..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-suspend.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-switch-user.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-switch-user.png deleted file mode 100644 index e1b7473b3b4eddb015749a05b424a79fa93681f0..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/system-switch-user.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tool-animator.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tool-animator.png deleted file mode 100644 index b3858962dfd4aca337650f91c32870aeb384079e..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tool-animator.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-burn-image.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-burn-image.png deleted file mode 100644 index 21f11d12754a54a4c076675488d8bad443682183..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-burn-image.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-burn.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-burn.png deleted file mode 100644 index 840742e49522a79906484f9aa84a694d9e57cfa3..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-burn.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-erase.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-erase.png deleted file mode 100644 index d6a38e9b411136fbd0893d67047de6a0d5e12229..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-erase.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-format.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-format.png deleted file mode 100644 index 44390704bd10b47c12159a6c30b6534c8a5bdd76..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-media-optical-format.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-report-bug.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-report-bug.png deleted file mode 100644 index b313d4d48ad6cb2410bd6ebb9699e75d4a8a661f..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-report-bug.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-rip-audio-cd.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-rip-audio-cd.png deleted file mode 100644 index 87e214e599f46b30a6340b6db180a629e8e3bb4f..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-rip-audio-cd.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-rip-video-cd.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-rip-video-cd.png deleted file mode 100644 index a09416535e0a88c960550bcbba3328513d05bfac..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-rip-video-cd.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-rip-video-dvd.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-rip-video-dvd.png deleted file mode 100644 index ed952cf6be3456fcf5bc73b8a761edb2303036cf..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-rip-video-dvd.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-wizard.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-wizard.png deleted file mode 100644 index 7762f6f9d1f8efa5cb97a54f107a38a45516f39f..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/tools-wizard.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/transform-crop-and-resize.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/transform-crop-and-resize.png deleted file mode 100644 index 166c196a1a2ddd5edc21261d1243b5b274a9f37a..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/transform-crop-and-resize.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/transform-move.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/transform-move.png deleted file mode 100644 index 44f860b42df2b5fdabb6f11a1034490f0e02ad5a..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/transform-move.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/transform-scale.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/transform-scale.png deleted file mode 100644 index d3c7e5c6c2eb2731a19ab8ffc429537682f308e3..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/transform-scale.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/view-conversation-balloon.png b/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/view-conversation-balloon.png deleted file mode 100644 index 4f168210fe4b0c15617bcef72f6468a15865d79f..0000000000000000000000000000000000000000 Binary files a/IHM_Retouche_Photo/ressource/image/oxygen/icons/64x64/view-conversation-balloon.png and /dev/null differ diff --git a/IHM_Retouche_Photo/ressource/stylesheet/QTDark.css b/IHM_Retouche_Photo/ressource/stylesheet/QTDark.css index 15123fe1decd29ab25650ceb059cf71a0b398eab..ede53c4fac0bcb722e4c4e04ebc446fc783cb004 100644 --- a/IHM_Retouche_Photo/ressource/stylesheet/QTDark.css +++ b/IHM_Retouche_Photo/ressource/stylesheet/QTDark.css @@ -1,6 +1,7 @@ * { - background: #272727; + background: #191919; color: #DDDDDD; + border: 1px solid #5A5A5A; } /* menu */ @@ -28,68 +29,21 @@ QMenuBar::item:pressed { #_filesSelector { border-bottom-right-radius: 10px; margin-bottom: 5px; - border: 1px solid #b6b6b6; - background-color: #212121; - border-left: transparent; - margin-right: 4px; } #_filesSelected { border-top-right-radius: 10px; border-bottom-right-radius: 10px; margin-bottom: 15px; - border: 1px solid #b6b6b6; - background-color: #212121; - border-left: transparent; - margin-right: 4px; } #_toolbox { border-bottom-left-radius: 10px; border-top-left-radius: 10px; margin-bottom: 5px; - border: 1px solid #b6b6b6; - background-color: #212121; - border-right: transparent; - margin-left: 4px; -} - -QListWidget:item { - margin-top: 4px; - margin-left: 15px; - margin-right: 15px; - background-color: #4375E3; - color: white; - border-radius: 10px; - padding-top: 4px; - padding-bottom: 4px; - padding-left: 4px; -} - -QListWidget::item:hover { - background: #2c4f9b; - color: white; - border: 1px; - border-style: solid; - border-color: #1d2e49; -} - -QListWidget::item:selected:active{ - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc); - color: white; -} - -QListWidget::item:selected:!active { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6593DB, stop: 1 #5073AC); - color: white; } -#_filesSelected:item { - margin-left: 5px; - margin-right: 5px; -} - -/* add and remove buttons */ +/* buttons */ #_add_selectable_element { border-radius: 5px; border: 1px; @@ -145,86 +99,6 @@ QListWidget::item:selected:!active { color: rgb(0, 0, 0); } -/* toolbar */ -QToolBar { - background-color: #254894; - color: white; - spacing: 3px; - margin-top: -1px; -} - -/* toolbar items */ -QToolButton { - border: 1px; - border-color: #585858; - border-style: solid; - border-radius: 6px; - padding-top: 2px; - padding-right: 10px; - padding-bottom: 2px; - padding-left: 10px; - background-color: #283e63; - color: black; -} -QToolButton:hover { - border-color: rgb(48, 83, 136); - background: #3859a1; - border: 1px; - border-color: #080836; - border-style: solid; - color: black; -} -QToolButton:pressed { - background-color: #2f477a; -} - -/* image container */ -QTableView { - gridline-color: #5A5A5A; -} - -QTabBar { - margin-left: 2px; -} - -QTabBar::tab { - border-top-right-radius: 4px; - padding: 4px; - margin: 4px; -} - -QTabBar::tab:selected { - background: #353535; -} - -/* Tree View */ -QTreeView::item { - color: rgb(255, 255, 255); - padding-bottom: 2px; -} - -QTreeView::item:hover { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #162136, stop: 1 #0e1624); - border: 1px; - border-style: solid; - border-color: #1c2c47; - padding-bottom: 2px; -} - -QTreeView::item:selected:active{ - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #224275, stop: 1 #0a234a); - color: white; - padding-bottom: 2px; - border-color: #1c2c47; -} - -QTreeView::item:selected:!active { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #09295c, stop: 1 #031533); - color: white; - padding-bottom: 2px; - border-color: #1c2c47; -} - /* scrollbar */ QScrollBar { border: 1px solid #5A5A5A; @@ -303,3 +177,70 @@ QScrollBar:left-arrow, QScrollBar::right-arrow, QScrollBar::up-arrow, QScrollBar QScrollBar::add-page, QScrollBar::sub-page { background: none; } + +/* image container */ +QTableView { + gridline-color: #5A5A5A; +} + +QTabBar { + margin-left: 2px; +} + +QTabBar::tab { + border-top-right-radius: 4px; + padding: 4px; + margin: 4px; +} + +QTabBar::tab:selected { + background: #353535; +} + +/**/ +QSlider { + border: none; +} + +QSlider::groove:horizontal { + height: 5px; + margin: 4px 0px 4px 0px; +} + +QSlider::groove:vertical { + width: 5px; + margin: 0px 4px 0px 4px; +} + +QSlider::handle { + border: 1px solid #5A5A5A; + background: #353535; +} + +QSlider::handle:horizontal { + width: 15px; + margin: -4px 0px -4px 0px; +} + +QSlider::handle:vertical { + height: 15px; + margin: 0px -4px 0px -4px; +} + +QSlider::add-page:vertical, QSlider::sub-page:horizontal { + background: #111381; +} + +QSlider::sub-page:vertical, QSlider::add-page:horizontal { + background: #353535; +} + +/**/ +QProgressBar { + text-align: center; +} + +QProgressBar::chunk { + width: 1px; + background-color: #0e1875; +} diff --git a/IHM_Retouche_Photo/ressource/stylesheet/QTWhite.css b/IHM_Retouche_Photo/ressource/stylesheet/QTWhite.css index 9cf37ff06222202c520852f8006500ad8e5dcc89..229b8a35ee2380ca4e92f4a876e76b0f80c95a00 100644 --- a/IHM_Retouche_Photo/ressource/stylesheet/QTWhite.css +++ b/IHM_Retouche_Photo/ressource/stylesheet/QTWhite.css @@ -1,3 +1,7 @@ +/* QWidget::item:selected { + background: #4278db; +} */ + /* menu */ QMenuBar { background-color: #4375E3; @@ -40,41 +44,7 @@ QMenuBar::item:pressed { margin-bottom: 5px; } -QListWidget:item { - margin-top: 4px; - margin-left: 15px; - margin-right: 15px; - background-color: #4375E3; - color: white; - border-radius: 10px; - padding-top: 4px; - padding-bottom: 4px; - padding-left: 4px; -} - -QListWidget::item:hover { - background: #2c4f9b; - border: 1px; - border-style: solid; - border-color: #1d2e49; -} - -QListWidget::item:selected:active{ - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc); - color: white; -} - -QListWidget::item:selected:!active { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6593DB, stop: 1 #5073AC); - color: white; -} - -#_filesSelected:item { - margin-left: 5px; - margin-right: 5px; -} - -/* add and remove buttons */ +/* buttons */ #_add_selectable_element { border-radius: 5px; border: 1px; @@ -130,60 +100,3 @@ QListWidget::item:selected:!active { background-color: #c2c2c2; color: rgb(0, 0, 0); } - -/* toolbar */ -QToolBar { - background-color: #2856b9; - color: white; - spacing: 3px; - margin-top: -1px; -} - -/* toolbar items */ -QToolButton { - border: 1px; - border-color: #8383b9; - border-style: solid; - border-radius: 6px; - padding-top: 2px; - padding-right: 10px; - padding-bottom: 2px; - padding-left: 10px; -} -QToolButton:hover { - border-color: rgb(48, 83, 136); - background: #3859a1; - border: 1px; - border-color: #080836; - border-style: solid; -} -QToolButton:pressed { - background-color: #2f477a; -} - -/* Tree View */ -/* QTreeView { - show-decoration-selected: 1; -} */ - -QTreeView::item { - color: black; - padding-bottom: 2px; -} - -QTreeView::item:hover { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1); - border: 1px; - border-style: solid; - border-color: #bfcde4; -} - -QTreeView::item:selected:active{ - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc); - color: white; -} - -QTreeView::item:selected:!active { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6593DB, stop: 1 #5073AC); - color: white; -} diff --git a/IHM_Retouche_Photo/tools/editable.h b/IHM_Retouche_Photo/tools/editable.h index 03ebf863606da6782a04cc8a8b70db27efb0ccb4..b332fa8ab5140d52786d72436b0802799ca0f62e 100644 --- a/IHM_Retouche_Photo/tools/editable.h +++ b/IHM_Retouche_Photo/tools/editable.h @@ -8,7 +8,7 @@ namespace tool { bool _free; public: - Editable(const QString & = "NaN", const QIcon & = QIcon(":/oxygen/16x16/ressource/image/oxygen/icons/16x16/draw-freehand.png"), bool = false); + Editable(const QString & = "NaN", const QIcon & = QIcon(":/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/draw-freehand.png"), bool = false); virtual void onMousePressed(ui::ImageArea &, QImage &, const QPoint &, const ui::Selection &, const QMouseEvent &) = 0; virtual void onMouseReleased(ui::ImageArea &, QImage &, const QPoint &, const ui::Selection &, const QMouseEvent &) = 0; diff --git a/IHM_Retouche_Photo/tools/hand.cpp b/IHM_Retouche_Photo/tools/hand.cpp index 24f6fbbced6ecb777de2ccd6b0797703daa3addc..03b7419f026b88253e043f56225c122611193ec0 100644 --- a/IHM_Retouche_Photo/tools/hand.cpp +++ b/IHM_Retouche_Photo/tools/hand.cpp @@ -2,7 +2,7 @@ namespace tool { Hand::Hand() - : Editable("Main", QIcon(":/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-move.png"), true), _leftButton(false) {} + : Editable("Main", QIcon(":/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-move.png"), true), _leftButton(false) {} void Hand::onMousePressed(ui::ImageArea & area, QImage &, const QPoint &, const ui::Selection &, const QMouseEvent & e) { if(e.button() == Qt::LeftButton) { diff --git a/IHM_Retouche_Photo/tools/selectionable/ellipse.cpp b/IHM_Retouche_Photo/tools/selectionable/ellipse.cpp deleted file mode 100644 index 4baaba8e28456c16dc3bb11134a6def897b417ba..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/ellipse.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include "ellipse.h" - -namespace tool { - Ellipse::Ellipse() - : Selectionable("Elipse", QIcon(":/oxygen/16x16/ressource/image/oxygen/icons/16x16/draw-ellipse.png"), true), _clicked(0,0), _hold(false), _multy(false) { - - } - - void Ellipse::onMousePressed(ui::ImageArea &, ui::Selection & s, const QPoint & clicked, const QImage &, const QMouseEvent & e) { - if(!this->_multy) { - s.clear(); - } - - if(e.button() == Qt::LeftButton) { - this->_clicked = clicked; - this->_hold = true; - } - } - - void Ellipse::onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent & e) { - if(e.button() == Qt::LeftButton) { - this->_hold = false; - } - } - - void Ellipse::onMouseMoved(ui::ImageArea &, ui::Selection & s, const QPoint & c, const QImage & img, const QMouseEvent &, bool) { - if(this->_hold) { - s.clear(); - QVector<QPoint> selection; - - int cx = this->_clicked.x(); - int cy = this->_clicked.y(); - - int width = c.x() - this->_clicked.x(); - int height = c.y() - this->_clicked.y(); - - for(int i = 0; i < width; i++) { - int dx = i - width / 2; - int x = cx + dx; - - int h = qRound(height * qSqrt(width * width / 4.0 - dx * dx) / width); - for(int dy = 1; dy < h; dy++) { - QPoint p(x, cy + dy); - if(img.rect().contains(p)) { - selection.push_back(p); - } - - p = QPoint(x, cy - dy); - if(img.rect().contains(p)) { - selection.push_back(p); - } - } - - if(h >= 0) { - QPoint p(x, cy); - if(img.rect().contains(p)) { - selection.push_back(p); - } - } - } - - s.select(selection); - } - } - - void Ellipse::onKeyPress(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent & e) { - if(e.key() == Qt::Key_Control) { - this->_multy = true; - qDebug() << "ctrl"; - } - } - - void Ellipse::onKeyReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent & e) { - if(e.key() == Qt::Key_Control) { - this->_multy = false; - } - } -} diff --git a/IHM_Retouche_Photo/tools/selectionable/ellipse.h b/IHM_Retouche_Photo/tools/selectionable/ellipse.h deleted file mode 100644 index dab06ab5280b48663113af7b0857b01d37abfe95..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/ellipse.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "../selectionnable.h" - -namespace tool { - class Ellipse : public Selectionable { - private: - QPoint _clicked; - bool _hold; - bool _multy; - - public: - Ellipse(); - - virtual void onMousePressed(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseMoved(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &, bool); - - virtual void onKeyPress(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent &); - virtual void onKeyReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent &); - }; -} diff --git a/IHM_Retouche_Photo/tools/selectionable/polygone.cpp b/IHM_Retouche_Photo/tools/selectionable/polygone.cpp deleted file mode 100644 index 2b1c83873d7b831a479cf2628e701c8479750087..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/polygone.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "polygone.h" - -namespace tool { - Polygone::Polygone() - : Selectionable("Polygone", QIcon(":/oxygen/16x16/ressource/image/oxygen/icons/16x16/draw-polygon.png"), true), _preview(true) { - - } - - void Polygone::onMousePressed(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &) { - - } - - void Polygone::onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint & clicked, const QImage &, const QMouseEvent & e) { - if(e.button() == Qt::LeftButton) { - if(this->_preview == false) { - this->_polygon.clear(); - } - this->_preview = true; - this->_polygon << clicked; - } - else if(e.button() == Qt::RightButton) { - this->_preview = false; - } - } - - void Polygone::onMouseMoved(ui::ImageArea &, ui::Selection & s, const QPoint & clicked, const QImage &, const QMouseEvent &, bool) { - s.clear(); - QPolygon poly = this->_polygon; - - if(this->_preview) { - poly << clicked; - } - - QRect boundingBox = poly.boundingRect(); - for(int x = 0; x < boundingBox.width(); x++) { - for(int y = 0; y < boundingBox.height(); y++) { - QPoint p(boundingBox.x() + x, boundingBox.y() + y); - if(poly.containsPoint(p, Qt::FillRule::OddEvenFill)) { - s.select(p); - } - } - } - } -} diff --git a/IHM_Retouche_Photo/tools/selectionable/polygone.h b/IHM_Retouche_Photo/tools/selectionable/polygone.h deleted file mode 100644 index fb4bf6524678d6fa3e61f7ccd5d84188d51b0041..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/polygone.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "../selectionnable.h" - -namespace tool { - class Polygone : public Selectionable { - private: - QPolygon _polygon; - bool _preview; - - public: - Polygone(); - - virtual void onMousePressed(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseMoved(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &, bool); - }; -} diff --git a/IHM_Retouche_Photo/tools/selectionable/rectangle.cpp b/IHM_Retouche_Photo/tools/selectionable/rectangle.cpp deleted file mode 100644 index e77915d58a36f861b7300dd8534ba507afd4d2c9..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/rectangle.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include "rectangle.h" - -namespace tool { - Rectangle::Rectangle() - : Selectionable("Rectangle", QIcon(":/oxygen/16x16/ressource/image/oxygen/icons/16x16/draw-rectangle.png"), true), _clicked(0,0), _hold(false), _multy(false) { - - } - - void Rectangle::onMousePressed(ui::ImageArea &, ui::Selection & s, const QPoint & clicked, const QImage &, const QMouseEvent & e) { - if(!this->_multy) { - s.clear(); - } - - if(e.button() == Qt::LeftButton) { - this->_clicked = clicked; - this->_hold = true; - } - } - - void Rectangle::onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent & e) { - if(e.button() == Qt::LeftButton) { - this->_hold = false; - } - } - - void Rectangle::onMouseMoved(ui::ImageArea &, ui::Selection & s, const QPoint & c, const QImage &, const QMouseEvent &, bool) { - if(this->_hold) { - s.clear(); - if(this->_clicked.x() < c.x() || this->_clicked.y() < c.y()) { - s.select(QRect(this->_clicked, c)); - } - else { - s.select(QRect(c, this->_clicked)); - } - } - } - - void Rectangle::onKeyPress(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent & e) { - if(e.key() == Qt::Key_Control) { - this->_multy = true; - qDebug() << "ctrl"; - } - } - - void Rectangle::onKeyReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent & e) { - if(e.key() == Qt::Key_Control) { - this->_multy = false; - } - } -} diff --git a/IHM_Retouche_Photo/tools/selectionable/rectangle.h b/IHM_Retouche_Photo/tools/selectionable/rectangle.h deleted file mode 100644 index d383b682470f159a5fe8bcd951efb8f64f4d7897..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/rectangle.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "../selectionnable.h" - -namespace tool { - class Rectangle : public Selectionable { - private: - QPoint _clicked; - bool _hold; - bool _multy; - - public: - Rectangle(); - - virtual void onMousePressed(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseMoved(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &, bool); - - virtual void onKeyPress(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent &); - virtual void onKeyReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent &); - }; -} diff --git a/IHM_Retouche_Photo/tools/selectionable/rectangleTriangle.cpp b/IHM_Retouche_Photo/tools/selectionable/rectangleTriangle.cpp deleted file mode 100644 index 0b08515ff45c205bfff7c794765031c521d89c1c..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/rectangleTriangle.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "rectangleTriangle.h" - -namespace tool { - RectangleTriangle::RectangleTriangle() - : Selectionable("Triangle Rectangle", QIcon(":/oxygen/16x16/ressource/image/oxygen/icons/16x16/draw-triangle.png"), true), _clicked(0,0), _hold(false), _multy(false) { - - } - - void RectangleTriangle::onMousePressed(ui::ImageArea &, ui::Selection & s, const QPoint & clicked, const QImage &, const QMouseEvent & e) { - if(!this->_multy) { - s.clear(); - } - - if(e.button() == Qt::LeftButton) { - this->_clicked = clicked; - this->_hold = true; - } - } - - void RectangleTriangle::onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent & e) { - if(e.button() == Qt::LeftButton) { - this->_hold = false; - } - } - - void RectangleTriangle::onMouseMoved(ui::ImageArea &, ui::Selection & s, const QPoint & position, const QImage & image, const QMouseEvent &, bool) { - if(this->_hold) { - s.clear(); - QVector<QPoint> selection; - int rows = position.y() - this->_clicked.y(); - for(int i = 0; i < rows; i++) { - for(int j = 0; j <= i; j++) { - QPoint pixel = QPoint(this->_clicked.x() + j, this->_clicked.y() + i); - if(image.rect().contains(pixel)) { - selection.push_back(pixel); - } - } - } - s.select(selection); - } - } - - void RectangleTriangle::onKeyPress(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent & e) { - if(e.key() == Qt::Key_Control) { - this->_multy = true; - qDebug() << "ctrl"; - } - } - - void RectangleTriangle::onKeyReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent & e) { - if(e.key() == Qt::Key_Control) { - this->_multy = false; - } - } -} diff --git a/IHM_Retouche_Photo/tools/selectionable/rectangleTriangle.h b/IHM_Retouche_Photo/tools/selectionable/rectangleTriangle.h deleted file mode 100644 index 6d2da1f9ef75a78336742459f0a2fd70625e7954..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/rectangleTriangle.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "../selectionnable.h" - -namespace tool { - class RectangleTriangle : public Selectionable { - private: - QPoint _clicked; - bool _hold; - bool _multy; - - public: - RectangleTriangle(); - - virtual void onMousePressed(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseMoved(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &, bool); - - virtual void onKeyPress(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent &); - virtual void onKeyReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent &); - }; -} diff --git a/IHM_Retouche_Photo/tools/selectionable/triangle.cpp b/IHM_Retouche_Photo/tools/selectionable/triangle.cpp deleted file mode 100644 index c7111b95c1520127daaf5b55292128d8850a45ec..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/triangle.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "triangle.h" - -namespace tool { - Triangle::Triangle() - : Selectionable("Triangle", QIcon(":/oxygen/16x16/ressource/image/oxygen/icons/16x16/draw-triangle3.png"), true), _clicked(0,0), _hold(false), _multy(false) { - - } - - void Triangle::onMousePressed(ui::ImageArea &, ui::Selection & s, const QPoint & clicked, const QImage &, const QMouseEvent & e) { - if(!this->_multy) { - s.clear(); - } - - if(e.button() == Qt::LeftButton) { - this->_clicked = clicked; - this->_hold = true; - } - } - - void Triangle::onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent & e) { - if(e.button() == Qt::LeftButton) { - this->_hold = false; - } - } - - void Triangle::onMouseMoved(ui::ImageArea &, ui::Selection & s, const QPoint & position, const QImage & image, const QMouseEvent &, bool) { - if(this->_hold) { - s.clear(); - QVector<QPoint> selection; - int rows = position.y() - this->_clicked.y(); - int x = 0; - int decal = 1; - - for(int i = 0; i < rows; i++) { - for(int j = 0; j < decal; j++) { - QPoint pos(x + j + this->_clicked.x(), i + this->_clicked.y()); - if(image.rect().contains(pos)) { - selection.push_back(pos); - } - - pos = QPoint(x - j + this->_clicked.x(), i + this->_clicked.y()); - if(image.rect().contains(pos)) { - selection.push_back(pos); - } - } - decal++; - } - - s.select(selection); - } - } - - void Triangle::onKeyPress(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent & e) { - if(e.key() == Qt::Key_Control) { - this->_multy = true; - qDebug() << "ctrl"; - } - } - - void Triangle::onKeyReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent & e) { - if(e.key() == Qt::Key_Control) { - this->_multy = false; - } - } -} diff --git a/IHM_Retouche_Photo/tools/selectionable/triangle.h b/IHM_Retouche_Photo/tools/selectionable/triangle.h deleted file mode 100644 index 7405087d3b8c95db782d5a35df969f5557308781..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/tools/selectionable/triangle.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "../selectionnable.h" - -namespace tool { - class Triangle : public Selectionable { - private: - QPoint _clicked; - bool _hold; - bool _multy; - - public: - Triangle(); - - virtual void onMousePressed(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &); - virtual void onMouseMoved(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &, bool); - - virtual void onKeyPress(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent &); - virtual void onKeyReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QKeyEvent &); - }; -} diff --git a/IHM_Retouche_Photo/tools/selectionnable.h b/IHM_Retouche_Photo/tools/selectionnable.h index 120be81b10f216e9ce9d8aa0f94343e7cc6f5c5b..adf266db697fc61029782aafd808bbf42483c52b 100644 --- a/IHM_Retouche_Photo/tools/selectionnable.h +++ b/IHM_Retouche_Photo/tools/selectionnable.h @@ -8,7 +8,7 @@ namespace tool { bool _free; public: - Selectionable(const QString & = "NaN", const QIcon & = QIcon(":/oxygen/16x16/ressource/image/oxygen/icons/16x16/transform-crop.png"), bool = false); + Selectionable(const QString & = "NaN", const QIcon & = QIcon(":/image/oxygen/icons/16x16/ressource/image/oxygen/icons/16x16/transform-crop.png"),bool = false); virtual void onMousePressed(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &) = 0; virtual void onMouseReleased(ui::ImageArea &, ui::Selection &, const QPoint &, const QImage &, const QMouseEvent &) = 0; diff --git a/IHM_Retouche_Photo/ui/menu/displaymenulambda.h b/IHM_Retouche_Photo/ui/menu/displaymenulambda.h index 5955f26d2be3491bf31c0ba498bedc7676d7eeab..f4330bd512159a5b3609d446edefda700910475d 100644 --- a/IHM_Retouche_Photo/ui/menu/displaymenulambda.h +++ b/IHM_Retouche_Photo/ui/menu/displaymenulambda.h @@ -13,6 +13,7 @@ namespace ui { ViewManager * _manager; ImageArea * _area; + protected: enum Actions : unsigned char { ZOOM_IN = 0, diff --git a/IHM_Retouche_Photo/ui/menu/imagemenulambda.cpp b/IHM_Retouche_Photo/ui/menu/imagemenulambda.cpp deleted file mode 100644 index feaa71f842da80e81e4bf1047121721eb40f1aea..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/ui/menu/imagemenulambda.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include "imagemenulambda.h" - -namespace ui { - imagemenulambda::imagemenulambda(dialog::ReScaleDialog * rescale, dialog::ReSizeDialog * resize,ViewManager * manager) - : _menu(nullptr), _rescale(rescale), _resize(resize), _viewManager(manager), _area(nullptr) { - QObject::connect(this->_viewManager, SIGNAL(changedView(ImageArea*)), this, SLOT(viewChange(ImageArea*))); - } - - void imagemenulambda::initializeMenu(const QMenu * menu) { - this->_menu = menu; - } - - void imagemenulambda::viewChange(ImageArea * area) { - if(this->_menu != nullptr) { - if(this->_area != nullptr) { - QObject::disconnect(this->_menu->actions().at(Actions::RESIZE), SIGNAL(triggered()), this->_resize, SLOT(use())); - QObject::disconnect(this->_menu->actions().at(Actions::RESCALE), SIGNAL(triggered()), this->_rescale, SLOT(use())); - QObject::disconnect(this->_menu->actions().at(Actions::TURN)->menu()->actions().at(0), SIGNAL(triggered()), this, SLOT(turn_V())); - QObject::disconnect(this->_menu->actions().at(Actions::TURN)->menu()->actions().at(1), SIGNAL(triggered()), this, SLOT(turn_H())); - QObject::disconnect(this->_menu->actions().at(Actions::ROTATE)->menu()->actions().at(0), SIGNAL(triggered()), this, SLOT(turn_left())); - QObject::disconnect(this->_menu->actions().at(Actions::ROTATE)->menu()->actions().at(1), SIGNAL(triggered()), this, SLOT(turn_right())); - } - - this->_area = area; - - if(this->_area != nullptr) { - QObject::connect(this->_menu->actions().at(Actions::RESIZE), SIGNAL(triggered()), this->_resize, SLOT(use())); - QObject::connect(this->_menu->actions().at(Actions::RESCALE), SIGNAL(triggered()), this->_rescale, SLOT(use())); - QObject::connect(this->_menu->actions().at(Actions::TURN)->menu()->actions().at(0), SIGNAL(triggered()), this, SLOT(turn_V())); - QObject::connect(this->_menu->actions().at(Actions::TURN)->menu()->actions().at(1), SIGNAL(triggered()), this, SLOT(turn_H())); - QObject::connect(this->_menu->actions().at(Actions::ROTATE)->menu()->actions().at(0), SIGNAL(triggered()), this, SLOT(turn_left())); - QObject::connect(this->_menu->actions().at(Actions::ROTATE)->menu()->actions().at(1), SIGNAL(triggered()), this, SLOT(turn_right())); - } - } - } - - void imagemenulambda::turn_H() { - if(this->_area != nullptr) { - QTransform t; - t.rotate(180, Qt::XAxis); - this->_area->transform(t); - } - } - - void imagemenulambda::turn_V() { - if(this->_area != nullptr) { - QTransform t; - t.rotate(180, Qt::YAxis); - this->_area->transform(t); - } - } - - void imagemenulambda::turn_left() { - if(this->_area != nullptr) { - QTransform t; - t.rotate(-90); - this->_area->transform(t); - } - } - - void imagemenulambda::turn_right() { - if(this->_area != nullptr) { - QTransform t; - t.rotate(90); - this->_area->transform(t); - } - } -} diff --git a/IHM_Retouche_Photo/ui/menu/imagemenulambda.h b/IHM_Retouche_Photo/ui/menu/imagemenulambda.h deleted file mode 100644 index 721534a27692a200f8358d0169feab817d969344..0000000000000000000000000000000000000000 --- a/IHM_Retouche_Photo/ui/menu/imagemenulambda.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include <QObject> -#include "menubarmanager.h" - -#include <dialog/rescaledialog.h> -#include <dialog/resizedialog.h> - -#include "../view/viewmanager.h" - -namespace ui { - class imagemenulambda : public MenuLambda { - Q_OBJECT - private: - const QMenu * _menu; - dialog::ReScaleDialog * _rescale; - dialog::ReSizeDialog * _resize; - ViewManager * _viewManager; - ImageArea * _area; - - protected: - enum Actions : unsigned char { - RESIZE = 0, - RESCALE = 1, - TURN = 3, - ROTATE = 4 - }; - - public: - imagemenulambda(dialog::ReScaleDialog *, dialog::ReSizeDialog *,ViewManager *); - - virtual void initializeMenu(const QMenu *) final; - - public slots: - void viewChange(ImageArea *); - - void turn_H(); - void turn_V(); - - void turn_left(); - void turn_right(); - }; -} diff --git a/IHM_Retouche_Photo/ui/toolbox/toolRegister.cpp b/IHM_Retouche_Photo/ui/toolbox/toolRegister.cpp index ebc28321996552da01d3da651587cfd79d2d59af..cbeaa54335fd0c2ef7ad9b8c32d9ce25239b80e5 100644 --- a/IHM_Retouche_Photo/ui/toolbox/toolRegister.cpp +++ b/IHM_Retouche_Photo/ui/toolbox/toolRegister.cpp @@ -17,8 +17,6 @@ namespace ui { QObject::connect(this->_toolbox, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(updateCurrentTool(QListWidgetItem*))); QObject::connect(this->_viewManager, SIGNAL(changedView(ImageArea*)), this, SLOT(updateCurrentView(ImageArea*))); QObject::connect(this->_viewManager, SIGNAL(createdView(ImageArea*)), this, SLOT(updateCurrentView(ImageArea*))); - - this->_toolbox->setCurrentRow(0); } void ToolboxRegister::updateCurrentTool(QListWidgetItem * item) { diff --git a/IHM_Retouche_Photo/ui/view/imagearea.cpp b/IHM_Retouche_Photo/ui/view/imagearea.cpp index 927b7b6ce7c168461e09be73a16d817586a4332d..93c3603700bae1d41312d0b1f760a1594b846c44 100644 --- a/IHM_Retouche_Photo/ui/view/imagearea.cpp +++ b/IHM_Retouche_Photo/ui/view/imagearea.cpp @@ -18,7 +18,6 @@ namespace ui { _mouseClickHold(false), _status(NEW) { this->setMouseTracking(true); - this->setFocusPolicy(Qt::StrongFocus); this->_image.fill(QColorConstants::White); } @@ -33,7 +32,6 @@ namespace ui { _mouseClickHold(false), _status(ORIGINAL) { this->setMouseTracking(true); - this->setFocusPolicy(Qt::StrongFocus); } void ImageArea::paintEvent(QPaintEvent * e) { @@ -100,8 +98,8 @@ namespace ui { pixelPosition.setY(abs(pixelPosition.y()) / this->_zoom); } - emit this->keyboardPress(*this, this->_image, pixelPosition,this->_selection, *event); this->repaint(); + emit this->keyboardPress(*this, this->_image, pixelPosition,this->_selection, *event); } void ImageArea::keyReleaseEvent(QKeyEvent * event) { @@ -164,33 +162,6 @@ namespace ui { } } - void ImageArea::setScale(const QPoint & scaling, Qt::TransformationMode mode) { - this->setImage(this->_image.scaled(scaling.x(), scaling.y(), Qt::IgnoreAspectRatio, mode)); - this->repaint(); - } - - void ImageArea::setSize(const QPoint & anchor, const QPoint & cliping) { - QImage copy = this->_image; - QPoint size(cliping.x() > copy.width() ? copy.width() : cliping.x(), cliping.y() > copy.height() ? copy.height() : cliping.y()); - - this->_image = QImage(size.x(), size.y(), QImage::Format_RGB32); - - int i = 0, j = 0; - for(int x = 0; x < size.x(); x++) { - for(int y = 0; y < size.y(); y++) { - this->setColor(QPoint(i, j), copy.pixelColor(anchor.x() + x, anchor.y() + y)); - j++; - } - i++; - j = 0; - } - } - - void ImageArea::transform(const QTransform & transformation, Qt::TransformationMode mode) { - this->_image = this->_image.transformed(transformation, mode); - emit this->imageChanged(this->_image); - } - void ImageArea::save() { if((this->_status & NEW) != 0) { QString path = QFileDialog::getSaveFileName(nullptr, "", "New"); diff --git a/IHM_Retouche_Photo/ui/view/imagearea.h b/IHM_Retouche_Photo/ui/view/imagearea.h index 60d77ea1bab4ebe0e41e1f6c3c37be3e31ee9d11..dc94499e0f97fac71d3c93ef4672d562ee3c6a7c 100644 --- a/IHM_Retouche_Photo/ui/view/imagearea.h +++ b/IHM_Retouche_Photo/ui/view/imagearea.h @@ -7,7 +7,6 @@ #include <QShortcut> #include <QKeyEvent> - #include "selection.h" namespace ui { @@ -79,10 +78,6 @@ namespace ui { void setImage(const QImage &); void setColor(const QPoint &, const QColor &); void setColor(const QVector<QPoint> &, const QColor &); - void setScale(const QPoint &, Qt::TransformationMode = Qt::TransformationMode::FastTransformation); - void setSize(const QPoint &, const QPoint &); - - void transform(const QTransform &, Qt::TransformationMode = Qt::TransformationMode::FastTransformation); void save(); void save(const QString &); diff --git a/IHM_Retouche_Photo/ui/view/selection.cpp b/IHM_Retouche_Photo/ui/view/selection.cpp index 340ee73bd9580f5037de75b22530b25fb892155d..07d4e844610b7d748f2703cc3c7bc3bc7fdd094f 100644 --- a/IHM_Retouche_Photo/ui/view/selection.cpp +++ b/IHM_Retouche_Photo/ui/view/selection.cpp @@ -1,7 +1,5 @@ #include "selection.h" -#include <QDebug> - namespace ui { Selection::Selection(const QSet<QPoint> & preselection,const QColor & color) : _pixels(preselection), _color(color) {} @@ -30,9 +28,9 @@ namespace ui { } void Selection::select(const QRect & selection) { - for(int x = 0; x < selection.width(); x++) { - for(int y = 0; y < selection.height(); y++) { - this->select(QPoint(selection.x() + x, selection.y() + y)); + for(int x = selection.x(); x < selection.width(); x++) { + for(int y = selection.y(); y < selection.height(); y++) { + this->select(QPoint(x, y)); } } } @@ -41,7 +39,7 @@ namespace ui { for(int x = 0; x < image.width(); x++) { for(int y = 0; y < image.width(); y++) { if(image.pixel(x, y) == color.rgba()) { - this->select(QPoint(x, y)); + this->selected(QPoint(x, y)); } } } diff --git a/IHM_Retouche_Photo/ui/view/viewmanager.cpp b/IHM_Retouche_Photo/ui/view/viewmanager.cpp index 1125d440797ce81b0c35e77e8ce24ece3ca8066b..45fcab480312633eab4731ea203941da175f4b15 100644 --- a/IHM_Retouche_Photo/ui/view/viewmanager.cpp +++ b/IHM_Retouche_Photo/ui/view/viewmanager.cpp @@ -11,7 +11,7 @@ namespace ui { : _selector(selector), _tabs(tabs) { QObject::connect(this->_selector, SIGNAL(selectItem(QFileInfo)), this, SLOT(newView(QFileInfo))); QObject::connect(this->_selector, SIGNAL(dropItem(QFileInfo)), this, SLOT(deleteView(QFileInfo))); - QObject::connect(this->_tabs, SIGNAL(currentChanged(int)), this, SLOT(changeView(int))); + QObject::connect(this->_tabs, SIGNAL(tabCloseRequested(int)), this, SLOT(deleteView(int))); } @@ -70,22 +70,20 @@ namespace ui { if(area != nullptr) { if(area->isOriginal()) { QMessageBox saveDialog; - saveDialog.setText("Voulez vous sauvegarder les modification sur le fichier original."); - saveDialog.setStandardButtons(QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); + saveDialog.setText("Voulez vous écraser le fichier original ?"); + saveDialog.setStandardButtons(QMessageBox::Save | QMessageBox::Cancel); saveDialog.setDefaultButton(QMessageBox::Cancel); saveDialog.setIcon(QMessageBox::Icon::Warning); int result = saveDialog.exec(); - if(result == QMessageBox::Yes) { + if(result == QMessageBox::Save) { area->setOriginal(false); } - else if(result == QMessageBox::No) { - this->saveAsCurrentView(); - } else { return; } } + area->save(); } } @@ -99,9 +97,6 @@ namespace ui { QFile file(path); file.open(QIODevice::ReadOnly); area->save(path); - area->setModified(false); - area->setOriginal(false); - area->setNew(false); } } } diff --git a/IHM_Retouche_Photo/ui/view/viewmanager.h b/IHM_Retouche_Photo/ui/view/viewmanager.h index ceb16dea0269d9be1ef0daf28a2a052bfe13c5f1..bd23d876591719ebbc3803615d7e61b075c53849 100644 --- a/IHM_Retouche_Photo/ui/view/viewmanager.h +++ b/IHM_Retouche_Photo/ui/view/viewmanager.h @@ -4,7 +4,6 @@ #include <QFileInfo> #include <QMap> #include <QPointer> -#include <QTableWidgetItem> #include "../files/fileselector.h" #include "imagearea.h"