Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philipp Auersperg
woodmaster-trainer
Commits
b31bd9d5
Commit
b31bd9d5
authored
4 years ago
by
Philipp Auersperg
Browse files
Options
Download
Email Patches
Plain Diff
begin for py3 support
parent
2d561b54
master
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
mains/trainer/main.py
+6
-3
mains/trainer/main.py
src/ui/kivy/cam.py
+8
-8
src/ui/kivy/cam.py
src/ui/kivy/mddialog.py
+2
-5
src/ui/kivy/mddialog.py
src/ui/kivy/sequence.py
+12
-9
src/ui/kivy/sequence.py
src/ui/kivy/widgets.py
+1
-1
src/ui/kivy/widgets.py
src/ui/kivy/widgetsmd.py
+5
-3
src/ui/kivy/widgetsmd.py
with
34 additions
and
29 deletions
+34
-29
mains/trainer/main.py
+
6
-
3
View file @
b31bd9d5
import
cv2
import
sys
from
kivymd.app
import
MDApp
sys
.
path
.
append
(
"../../src"
)
import
os
...
...
@@ -317,16 +320,16 @@ class MainWindow(TabbedPanel):
print
(
'unknown task finished:'
,
tag
)
class
WoodmasterApp
(
App
,
BaseApp
):
class
WoodmasterApp
(
MD
App
,
BaseApp
):
_project
=
None
theme_cls
=
ThemeManager
()
#
theme_cls = ThemeManager()
show_editor
=
BooleanProperty
(
True
)
def
__init__
(
self
,
*
a
,
**
kw
):
self
.
_app_name
=
"woodmaster"
super
(
WoodmasterApp
,
self
).
__init__
(
*
a
,
**
kw
)
self
.
theme_cls
.
primary_palette
=
'
Grey
'
self
.
theme_cls
.
primary_palette
=
'
Indigo
'
self
.
theme_cls
.
theme_style
=
'Dark'
def
build
(
self
):
...
...
This diff is collapsed.
Click to expand it.
src/ui/kivy/cam.py
+
8
-
8
View file @
b31bd9d5
...
...
@@ -19,10 +19,10 @@ from kivy.graphics import (
from
kivy.properties
import
StringProperty
,
BooleanProperty
,
ObjectProperty
,
ListProperty
,
NumericProperty
from
kivy.clock
import
mainthread
,
Clock
from
kivymd.uix.selectioncontrol
import
MDSwitch
from
kivymd.selectioncontrols
import
MDSwitch
from
kivymd.textfields
import
MDTextField
from
kivymd.button
import
MDIconButton
,
MDFloatingActionButton
from
kivymd.uix.textfield
import
MDTextField
from
kivymd.uix.button
import
MDIconButton
,
MDFloatingActionButton
from
.
import
drawing
from
detector.algorithms
import
projection
...
...
@@ -158,11 +158,11 @@ try:
size_hint:None,None
orientation:'vertical'
padding:sp(15),0
MDSwitch:
size_hint:None,None
size: sp(48), dp(20)
id:switch_camera
on_press: print (self.active)
#
MDSwitch:
#
size_hint:None,None
#
size: sp(48), dp(20)
#
id:switch_camera
#
on_press: print (self.active)
MDLabel:
size_hint:None,None
height:dp(20)
...
...
This diff is collapsed.
Click to expand it.
src/ui/kivy/mddialog.py
+
2
-
5
View file @
b31bd9d5
...
...
@@ -8,12 +8,9 @@ from kivy.uix.modalview import ModalView
from
kivy.uix.popup
import
PopupException
from
kivy.animation
import
Animation
from
kivymd.theming
import
ThemableBehavior
try
:
from
kivymd.elevationbehavior
import
RectangularElevationBehavior
except
ImportError
:
from
kivymd.elevation
import
RectangularElevationBehavior
from
kivymd.uix.behaviors.elevation
import
RectangularElevationBehavior
from
kivymd.button
import
MDFlatButton
from
kivymd.
uix.
button
import
MDFlatButton
Builder
.
load_string
(
'''
<MDDialog>:
...
...
This diff is collapsed.
Click to expand it.
src/ui/kivy/sequence.py
+
12
-
9
View file @
b31bd9d5
...
...
@@ -21,15 +21,18 @@ from kivy.uix.scrollview import ScrollView
from
kivy.uix.scatterlayout
import
ScatterLayout
from
kivy.uix.stencilview
import
StencilView
from
kivymd.button
import
MDRaisedButton
,
MDFlatButton
,
MDFloatingActionButton
from
kivymd.list
import
MDList
,
OneLineListItem
,
TwoLineListItem
,
ThreeLineListItem
from
kivymd.tabs
import
MDTabbedPanel
,
MDTab
from
kivymd.toolbar
import
MDToolbar
from
kivymd.textfields
import
MDTextField
from
kivymd.uix.button
import
MDRaisedButton
,
MDFlatButton
,
MDFloatingActionButton
from
kivymd.uix.list
import
MDList
,
OneLineListItem
,
TwoLineListItem
,
ThreeLineListItem
# from kivymd.uix.tab import MDTabbedPanel, MDTab
from
kivymd.uix.toolbar
import
MDToolbar
from
kivymd.uix.textfield
import
MDTextField
from
.mddialog
import
MDDialog
from
kivymd.label
import
MDLabel
from
kivymd.
uix.
label
import
MDLabel
from
.widgetsmd
import
MDNumberInput
,
yesno_box
from
kivymd.list
import
MDList
from
kivymd.
uix.
list
import
MDList
from
ui.kivy.cam
import
CameraClick
from
ui.kivy.widgets
import
apply_image
...
...
@@ -564,7 +567,7 @@ class SequenceThumbListView(ScrollView):
def
on_image_select
(
self
,
imgpath
):
"""dummy impl"""
from
kivymd.bottomsheet
import
MDGridBottomSheet
,
MDBottomSheet
from
kivymd.
uix.
bottomsheet
import
MDGridBottomSheet
,
MDBottomSheet
Builder
.
load_string
(
"""
<SequenceImageInformation>:
...
...
@@ -629,7 +632,7 @@ class SequenceImageInformation(ScrollView):
def
__init__
(
self
,
*
a
,
**
kw
):
super
(
SequenceImageInformation
,
self
).
__init__
(
*
a
,
**
kw
)
from
kivymd.list
import
MDList
from
kivymd.
uix.
list
import
MDList
from
kivy.uix.scrollview
import
ScrollView
...
...
This diff is collapsed.
Click to expand it.
src/ui/kivy/widgets.py
+
1
-
1
View file @
b31bd9d5
...
...
@@ -371,7 +371,7 @@ class SubprocessObserver(BoxLayout):
def
on_task_finished
(
self
,
*
a
,
**
kw
):
print
(
"SubProcessObserver::on_task_finished:"
,
a
,
kw
)
from
kivymd.button
import
MDRaisedButton
,
MDFlatButton
,
BaseRectangularButton
from
kivymd.
uix.
button
import
MDRaisedButton
,
MDFlatButton
,
BaseRectangularButton
class
DropDownList
(
MDFlatButton
):
values
=
ListProperty
()
...
...
This diff is collapsed.
Click to expand it.
src/ui/kivy/widgetsmd.py
+
5
-
3
View file @
b31bd9d5
...
...
@@ -29,10 +29,12 @@ from kivy.graphics.context_instructions import Color
from
kivy.graphics.vertex_instructions
import
Rectangle
,
Line
from
kivy.clock
import
Clock
from
kivymd.uix.label
import
MDLabel
from
kivymd.textfields
import
MDTextField
,
MDLabel
from
kivymd.button
import
MDFlatButton
,
MDIconButton
,
MDRaisedButton
from
kivymd.selectioncontrols
import
MDCheckbox
from
kivymd.uix.textfield
import
MDTextField
from
kivymd.uix.button
import
MDFlatButton
,
MDIconButton
,
MDRaisedButton
from
kivymd.uix.selectioncontrol
import
MDCheckbox
from
.mddialog
import
MDDialog
from
.widgets
import
NumberInputBehavior
,
LabeledCheckBox
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help