Skip to content
GitLab
Explore
Sign in
openEmbroidery
openEmbroidery_software
Compare revisions
028adc2c7206fda497c08e8708acceea0c4c0672 to 4a5b8ba023dac44e8da1c1d8f2278cb35465b2c8
Commits on Source (3)
remove glfw module
· 506d9059
3dsman
authored
Dec 12, 2019
506d9059
update .gitignore
· e1810d99
3dsman
authored
Dec 12, 2019
e1810d99
highlight the stitch under the mouse while flyover stitchlist
· 4a5b8ba0
3dsman
authored
Dec 12, 2019
4a5b8ba0
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
4a5b8ba0
build
build_win
doxygen
pes
.codelite
motifs
external
*.o
\ No newline at end of file
*.o
*.oe
.gitmodules
View file @
4a5b8ba0
[submodule "external/glfw"]
path = external/glfw
url = https://github.com/glfw/glfw
glfw
@
999f3556
Compare
999f3556
...
999f3556
Subproject commit 999f3556fdd80983b10051746264489f2cb1ef16
include/OE_display.h
View file @
4a5b8ba0
...
...
@@ -130,6 +130,7 @@ class OE_display : public QOpenGLWidget, protected QOpenGLFunctions_2_0
bool
pan
;
int
width
,
height
;
OE_displayStyle
*
style
=
NULL
;
OE_stitchs
*
higligtedStitch
=
nullptr
;
protected
:
...
...
src/OE_display.cpp
View file @
4a5b8ba0
...
...
@@ -410,7 +410,10 @@ bool OE_display::drawStitch(OE_stitchs* stitch, int curpoint)
unsigned
i
;
// Points
glPointSize
(
OE_preferences
::
stitchPointSize
);
if
(
stitch
==
higligtedStitch
)
glPointSize
(
OE_preferences
::
stitchPointSize
*
2
);
else
glPointSize
(
OE_preferences
::
stitchPointSize
);
glBegin
(
GL_POINTS
);
if
(
curpoint
>
0
)
...
...
@@ -432,7 +435,10 @@ bool OE_display::drawStitch(OE_stitchs* stitch, int curpoint)
glEnd
();
//draw lines
glLineWidth
(
OE_preferences
::
stitchLineWidth
);
if
(
stitch
==
higligtedStitch
)
glLineWidth
(
OE_preferences
::
stitchLineWidth
*
2
);
else
glLineWidth
(
OE_preferences
::
stitchLineWidth
);
glBegin
(
GL_LINE_STRIP
);
OE_thread
*
thread
=
stitch
->
getThread
();
if
(
thread
)
...
...
@@ -1384,6 +1390,8 @@ bool OE_display::draw()
selectionBounds
+=
(
*
stitch
)
->
getBound
();
stitch
++
;
}
if
(
higligtedStitch
)
drawStitch
(
higligtedStitch
,
0
);
}
if
(
style
->
drawCommands
)
{
...
...
src/qt/OE_ui_stitchlist.cpp
View file @
4a5b8ba0
...
...
@@ -14,6 +14,8 @@ OE_ui_stitchList::OE_ui_stitchList(MainWindow* window, OE_root* root)
setDropIndicatorShown
(
true
);
setDefaultDropAction
(
Qt
::
TargetMoveAction
);
setMouseTracking
(
true
);
setMinimumSize
(
100
,
0
);
setDragDropMode
(
QAbstractItemView
::
InternalMove
);
...
...
@@ -30,7 +32,7 @@ OE_ui_stitchList::OE_ui_stitchList(MainWindow* window, OE_root* root)
connect
(
getInterfaceDisplay
(),
SIGNAL
(
refreshStitch
(
OE_stitchs
*
)),
this
,
SLOT
(
on_refreshStitch
(
OE_stitchs
*
)));
connect
(
selectionModel
(),
SIGNAL
(
selectionChanged
(
QItemSelection
,
QItemSelection
)),
this
,
SLOT
(
handleSelectionChanged
()));
connect
(
getInterfaceDisplay
(),
SIGNAL
(
stitchSelectionChange
()),
this
,
SLOT
(
on_refreshStitchList
()));
connect
(
this
,
SIGNAL
(
entered
(
QModelIndex
)),
this
,
SLOT
(
enteredSlot
(
QModelIndex
)));
showMaximized
();
...
...
@@ -180,6 +182,21 @@ void OE_ui_stitchList::keyPressEvent(QKeyEvent *event)
QListView
::
keyPressEvent
(
event
);
}
void
OE_ui_stitchList
::
leaveEvent
(
QEvent
*
event
)
{
QListView
::
leaveEvent
(
event
);
getInterfaceDisplay
()
->
higligtedStitch
=
nullptr
;
}
void
OE_ui_stitchList
::
enteredSlot
(
QModelIndex
index
)
{
std
::
list
<
OE_stitchs
*>::
iterator
it
=
getDocument
()
->
stitchs
.
begin
();
std
::
advance
(
it
,
index
.
row
());
getInterfaceDisplay
()
->
higligtedStitch
=
*
it
;
getInterfaceDisplay
()
->
update
();
}
OE_controller
*
OE_ui_stitchList
::
getController
()
{
return
this
->
root
->
interfaceDisplay
->
getController
();
...
...
src/qt/OE_ui_stitchlist.h
View file @
4a5b8ba0
...
...
@@ -29,12 +29,14 @@ private:
void
addItem
(
QColor
color
,
QIcon
icon
,
QIcon
type
,
QIcon
pattern
,
int
stitchCount
);
void
addItem
(
QColor
color
,
int
stitchCount
);
void
keyPressEvent
(
QKeyEvent
*
event
);
void
leaveEvent
(
QEvent
*
event
);
protected:
void
dropEvent
(
QDropEvent
*
event
);
private
slots
:
void
on_refreshStitchList
();
void
on_refreshStitch
(
OE_stitchs
*
stitch
);
void
handleSelectionChanged
();
void
enteredSlot
(
QModelIndex
index
);
};
#endif // OE_UI_STITCHLIST_H