Skip to content
GitLab
Explore
Sign in
openEmbroidery
openEmbroidery_software
Compare revisions
1a74031674040b066437c6113ae5fcbd856b52bc to 2cdb6100791267b94487be99ba904156032a9d03
Hide whitespace changes
Inline
Side-by-side
src/actions/OE_actionsStitchs.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"actions/OE_actionsStitchs.h"
#include
"actions/OE_actionsLineStitchs.h"
...
...
src/actions/OE_actionsThreads.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"actions/OE_actionsThreads.h"
#include
"OE_document.h"
...
...
src/curves/OE_curve.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"curves/OE_curve.h"
#include
"OE_utils.h"
...
...
src/curves/OE_joincurve.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"curves/OE_joincurve.h"
#include
<iostream>
...
...
src/curves/OE_pointcurve.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"curves/OE_pointcurve.h"
#include
"OE_utils.h"
...
...
src/curves/OE_subcurve.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"curves/OE_subcurve.h"
#include
"Archive.h"
...
...
src/instructions/OE_instruction.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"instructions/OE_instruction.h"
...
...
src/instructions/OE_start.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"instructions/OE_start.h"
...
...
src/instructions/OE_waitcolor.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"instructions/OE_waitcolor.h"
...
...
src/io/OE_io_JPG.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"OE_io.h"
#include
"OE_document.h"
...
...
src/io/OE_io_OE.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"OE_io.h"
#include
"OE_document.h"
...
...
src/io/OE_io_PES.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"OE_io.h"
#include
"OE_document.h"
...
...
src/io/OE_io_SVG.cpp
View file @
2cdb6100
/*
* Copyright (c) 2015 Tricoire Sebastien 3dsman@free.fr
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
*/
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"OE_io.h"
#include
"OE_utils.h"
...
...
src/machine.cpp
View file @
2cdb6100
/*
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"machine.h"
#include
<QMetaEnum>
#include
<QDebug>
...
...
src/qt/OE_ui_toolbox.cpp
View file @
2cdb6100
...
...
@@ -10,7 +10,7 @@ OE_ui_toolBox::OE_ui_toolBox(MainWindow* window, OE_root* root)
buttonFont
=
QFont
(
"Roboto"
,
8
,
QFont
::
Medium
);
setFixedWidth
(
150
);
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Expanding
);
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Expanding
);
QVBoxLayout
*
drawerLeftLayout
=
new
QVBoxLayout
;
setLayout
(
drawerLeftLayout
);
...
...
@@ -47,9 +47,9 @@ OE_ui_toolBox::OE_ui_toolBox(MainWindow* window, OE_root* root)
setContentsMargins
(
0
,
0
,
0
,
0
);
}
QtMaterial
Flat
Button
*
OE_ui_toolBox
::
setButton
(
QString
name
,
const
QObject
*
receiver
=
NULL
,
const
char
*
method
=
NULL
)
QtMaterialButton
*
OE_ui_toolBox
::
setButton
(
QString
name
,
const
QObject
*
receiver
=
NULL
,
const
char
*
method
=
NULL
)
{
QtMaterial
Flat
Button
*
button
=
new
QtMaterial
Flat
Button
(
name
);
QtMaterialButton
*
button
=
new
QtMaterialButton
(
name
);
button
->
setFont
(
buttonFont
);
button
->
setUseThemeColors
(
true
);
...
...
@@ -57,19 +57,37 @@ QtMaterialFlatButton* OE_ui_toolBox::setButton(QString name, const QObject *rece
button
->
setTextAlignment
(
Qt
::
AlignLeft
);
button
->
setMinimumHeight
(
0
);
button
->
setFixedHeight
(
30
);
if
(
method
)
connect
(
button
,
SIGNAL
(
clicked
(
bool
)),
receiver
,
method
);
return
button
;
}
QtMaterial
Flat
Button
*
OE_ui_toolBox
::
setButton
(
QString
name
,
QString
iconFile
,
const
QObject
*
receiver
=
NULL
,
const
char
*
method
=
NULL
)
QtMaterialButton
*
OE_ui_toolBox
::
setButton
(
QString
name
,
QString
iconFile
,
const
QObject
*
receiver
=
NULL
,
const
char
*
method
=
NULL
)
{
QtMaterial
Flat
Button
*
newB
utton
=
setButton
(
name
,
receiver
,
method
);
QtMaterialButton
*
b
utton
=
setButton
(
name
,
receiver
,
method
);
QIcon
icon
;
icon
.
addFile
(
iconFile
,
QSize
(),
QIcon
::
Normal
,
QIcon
::
Off
);
newButton
->
setIcon
(
icon
);
icon
.
addFile
(
iconFile
,
QSize
(),
QIcon
::
Normal
,
QIcon
::
Off
);
button
->
setIcon
(
icon
);
button
->
setFixedHeight
(
30
);
button
->
setIconSize
(
QSize
(
20
,
20
));
//newButton->setIconPlacement(Material::ButtonIconPlacement::RightIcon);
return
newButton
;
return
button
;
}
QtMaterialIconButton
*
OE_ui_toolBox
::
setIconButton
(
QString
iconFile
,
const
QObject
*
receiver
=
NULL
,
const
char
*
method
=
NULL
)
{
QIcon
icon
;
icon
.
addFile
(
iconFile
,
QSize
(),
QIcon
::
Normal
,
QIcon
::
Off
);
QtMaterialIconButton
*
button
=
new
QtMaterialIconButton
(
icon
);
button
->
setUseThemeColors
(
false
);
button
->
setIconSize
(
QSize
(
30
,
30
));
button
->
setRole
(
Material
::
Primary
);
if
(
method
)
connect
(
button
,
SIGNAL
(
clicked
()),
receiver
,
method
);
return
button
;
}
void
OE_ui_toolBox
::
addFilesTools
(
QtMaterialToolTabs
*
tabs
)
...
...
@@ -106,10 +124,10 @@ void OE_ui_toolBox::addGuidesTools(QtMaterialToolTabs *tabs)
label
->
setAlignment
(
Qt
::
AlignCenter
);
toolLayout
->
addWidget
(
label
);
QHBoxLayout
*
turnLayout
=
new
QHBoxLayout
();
//curTab->content());
toolLayout
->
addLayout
(
turnLayout
);
turnLayout
->
addWidget
(
setButton
(
"
Right
"
));
turnLayout
->
addWidget
(
setButton
(
"
Left
"
));
turnLayout
->
addWidget
(
setButton
(
"
360°
"
));
toolLayout
->
addLayout
(
turnLayout
);
turnLayout
->
addWidget
(
set
Icon
Button
(
"
:/resources/turn_left.svg
"
));
turnLayout
->
addWidget
(
set
Icon
Button
(
"
:/resources/turn_180.svg
"
));
turnLayout
->
addWidget
(
set
Icon
Button
(
"
:/resources/turn_right.svg
"
));
toolLayout
->
addWidget
(
setButton
(
"Add curve"
));
...
...
@@ -126,9 +144,9 @@ void OE_ui_toolBox::addStitchTools(QtMaterialToolTabs *tabs)
toolLayout
->
setSpacing
(
0
);
toolLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
toolLayout
->
addWidget
(
setButton
(
"New line"
,
getInterfaceDisplay
(),
SLOT
(
newLinestitch
())));
toolLayout
->
addWidget
(
setButton
(
"New birail"
,
getInterfaceDisplay
(),
SLOT
(
newBirailstitch
())));
toolLayout
->
addWidget
(
setButton
(
"New fill"
,
getInterfaceDisplay
(),
SLOT
(
newFillstitch
())));
toolLayout
->
addWidget
(
setButton
(
"New line"
,
":/resources/line_stitch.svg"
,
getInterfaceDisplay
(),
SLOT
(
newLinestitch
())));
toolLayout
->
addWidget
(
setButton
(
"New birail"
,
":/resources/birail_stitch.svg"
,
getInterfaceDisplay
(),
SLOT
(
newBirailstitch
())));
toolLayout
->
addWidget
(
setButton
(
"New fill"
,
":/resources/fill_stitch.svg"
,
getInterfaceDisplay
(),
SLOT
(
newFillstitch
())));
//toolLayout->addWidget(setButton("Reverse selected", SLOT(on_actionReverse_curve_R_triggered())));
toolLayout
->
addStretch
();
...
...
@@ -142,7 +160,7 @@ void OE_ui_toolBox::addStitchTools(QtMaterialToolTabs *tabs)
paternLayout
->
addWidget
(
setButton
(
"2"
,
this
,
SLOT
(
on_actionPattern2_triggered
())),
0
,
1
,
1
,
1
);
paternLayout
->
addWidget
(
setButton
(
"3"
,
this
,
SLOT
(
on_actionPattern3_triggered
())),
0
,
2
,
1
,
1
);
/*paternLayout->addWidget(setButton("3",SLOT(on_actionPattern3_triggered())),0,2,1,1);
QtMaterial
Flat
Button* button = new QtMaterial
Flat
Button("3");
QtMaterialButton* button = new QtMaterialButton("3");
button->setFont(buttonFont);
button->setUseThemeColors(true);
...
...
src/qt/OE_ui_toolbox.h
View file @
2cdb6100
...
...
@@ -5,7 +5,7 @@
#include
"mainwindow.h"
#include
<QtWidgets/qlabel.h>
#include
<qtmaterialtooltabs.h>
#include
<qtmaterial
flat
button.h>
#include
<qtmaterialbutton.h>
class
MainWindow
;
...
...
@@ -23,9 +23,10 @@ private:
OE_root
*
root
;
MainWindow
*
window
;
QFont
buttonFont
;
QtMaterialFlatButton
*
setButton
(
QString
name
,
const
QObject
*
receiver
,
const
char
*
method
);
QtMaterialFlatButton
*
setButton
(
QString
name
,
QString
iconFile
,
const
QObject
*
receiver
,
const
char
*
method
);
void
addFilesTools
(
QtMaterialToolTabs
*
tabs
);
QtMaterialButton
*
setButton
(
QString
name
,
const
QObject
*
receiver
,
const
char
*
method
);
QtMaterialButton
*
setButton
(
QString
name
,
QString
iconFile
,
const
QObject
*
receiver
,
const
char
*
method
);
QtMaterialIconButton
*
setIconButton
(
QString
iconFile
,
const
QObject
*
receiver
,
const
char
*
method
);
void
addFilesTools
(
QtMaterialToolTabs
*
tabs
);
void
addGuidesTools
(
QtMaterialToolTabs
*
tabs
);
void
addStitchTools
(
QtMaterialToolTabs
*
tabs
);
void
addThreadTools
(
QtMaterialToolTabs
*
tabs
);
...
...
src/qt/OE_ui_viewportoptions.cpp
View file @
2cdb6100
...
...
@@ -22,6 +22,7 @@ QtMaterialIconButton* OE_ui_viewportOptions::setIconButton(QString iconFile, con
button
->
setUseThemeColors
(
false
);
button
->
setIconSize
(
QSize
(
25
,
25
));
button
->
setRole
(
Material
::
Primary
);
button
->
setToolTip
(
"test"
);
if
(
method
)
connect
(
button
,
SIGNAL
(
clicked
()),
receiver
,
method
);
return
button
;
...
...
@@ -41,6 +42,11 @@ void OE_ui_viewportOptions::topGlWindowBar()
gridButton
->
setCheckable
(
true
);
addWidget
(
gridButton
);
hoopButton
=
setIconButton
(
":/resources/hoop.svg"
,
this
,
SLOT
(
onToggleHoop
()));
hoopButton
->
setCheckable
(
true
);
addWidget
(
hoopButton
);
addSpacing
(
8
);
showCurvesButton
=
setIconButton
(
":/resources/show_curve.svg"
,
this
,
SLOT
(
onToggleShowCurve
()));
showCurvesButton
->
setCheckable
(
true
);
addWidget
(
showCurvesButton
);
...
...
@@ -79,6 +85,7 @@ OE_document* OE_ui_viewportOptions::getDocument()
void
OE_ui_viewportOptions
::
onRefresh
()
{
gridButton
->
setChecked
(
getInterfaceDisplay
()
->
style
->
drawGrid
);
hoopButton
->
setChecked
(
getInterfaceDisplay
()
->
style
->
drawHoop
);
showCurvesButton
->
setChecked
(
getInterfaceDisplay
()
->
style
->
drawCurves
);
showStitchButton
->
setChecked
(
getInterfaceDisplay
()
->
style
->
drawStitches
);
selectCurvesButton
->
setChecked
(
getInterfaceDisplay
()
->
style
->
selectCurves
);
...
...
@@ -91,6 +98,12 @@ void OE_ui_viewportOptions::onToggleGrid()
getInterfaceDisplay
()
->
update
();
}
void
OE_ui_viewportOptions
::
onToggleHoop
()
{
getInterfaceDisplay
()
->
style
->
drawHoop
=
!
getInterfaceDisplay
()
->
style
->
drawHoop
;
getInterfaceDisplay
()
->
update
();
}
void
OE_ui_viewportOptions
::
onToggleShowCurve
()
{
getInterfaceDisplay
()
->
style
->
drawCurves
=
!
getInterfaceDisplay
()
->
style
->
drawCurves
;
...
...
src/qt/OE_ui_viewportoptions.h
View file @
2cdb6100
...
...
@@ -23,6 +23,7 @@ private:
MainWindow
*
window
;
QtMaterialIconButton
*
gridButton
;
QtMaterialIconButton
*
hoopButton
;
QtMaterialIconButton
*
showCurvesButton
;
QtMaterialIconButton
*
showStitchButton
;
QtMaterialIconButton
*
selectCurvesButton
;
...
...
@@ -33,6 +34,7 @@ public slots:
void
onRefresh
();
void
onToggleGrid
();
void
onToggleHoop
();
void
onToggleShowCurve
();
void
onToggleShowStitch
();
void
onToggleSelectCurve
();
...
...
src/qt/mainwindow.cpp
View file @
2cdb6100
/*
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#include
"mainwindow.h"
#include
"ui_mainwindow.h"
#include
"main.h"
...
...
@@ -143,7 +152,7 @@ QBoxLayout* MainWindow::stitchParam()
m_checkBox
->
setIconSize
(
QSize
(
5
,
5
));
topGlWindowLayout
->
addWidget
(
m_checkBox
);
topGlWindowLayout
->
setAlignment
(
m_checkBox
,
Qt
::
AlignCenter
);
topGlWindowLayout
->
addWidget
(
new
QtMaterial
Flat
Button
(
"param3"
));
topGlWindowLayout
->
addWidget
(
new
QtMaterialButton
(
"param3"
));
return
topGlWindowLayout
;
}
...
...
src/qt/mainwindow.h
View file @
2cdb6100
/*
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
...
...
@@ -17,7 +26,7 @@
#include
<QtWidgets/QPushButton>
#include
<QtWidgets/QWidget>
#include
<QtWidgets/qlabel.h>
#include
<qtmaterial
flat
button.h>
#include
<qtmaterialbutton.h>
#include
<qtmaterialiconbutton.h>
class
Machine
;
...
...
Prev
1
2
3
4
5
Next