7
7
This program puts together multiple widgets
8
8
on a single application.
9
9
10
- Version: 0.5 beta
10
+ Version: 0.6 beta
11
11
12
12
Author: Fernando Daniel Jaime
13
13
Last edited: January 2018
24
24
from player .player import (VideoWidget , PlaylistModel , PlayerControls ,
25
25
FrameProcessor , HistogramWidget , Player )
26
26
from calculator .calculator import Button , Calculator
27
+ from camera .camera import Camera , ImageSettings , VideoSettings
27
28
28
29
29
30
class Multitool (QMainWindow , QWidget ):
@@ -42,17 +43,20 @@ def __init__(self):
42
43
self .stack2 = QWidget () # Screenshot
43
44
self .stack3 = QWidget () # Player
44
45
self .stack4 = QWidget () # Calculator
46
+ self .stack5 = QWidget () # Camera
45
47
46
48
self .stack1UI () # Mouse Clicker
47
49
self .stack2UI () # Screenshot
48
50
self .stack3UI () # Player
49
51
self .stack4UI () # Calculator
52
+ self .stack5UI () # Camera
50
53
51
54
self .Stack = QStackedWidget (self )
52
55
self .Stack .addWidget (self .stack1 ) # Mouse Clicker
53
56
self .Stack .addWidget (self .stack2 ) # Screenshot
54
57
self .Stack .addWidget (self .stack3 ) # Player
55
58
self .Stack .addWidget (self .stack4 ) # Calculator
59
+ self .Stack .addWidget (self .stack5 ) # Camera
56
60
57
61
# General actions starts -------------------------------------
58
62
exitAction = QAction (QIcon ('icons/exit.png' ), '&Exit' , self )
@@ -101,6 +105,10 @@ def __init__(self):
101
105
calculatorAction = QAction (QIcon ('icons/calc.ico' ),'Calculator' , self )
102
106
calculatorAction .setStatusTip ('Calculator' )
103
107
calculatorAction .triggered .connect (lambda : self .display (3 ))
108
+
109
+ cameraAction = QAction (QIcon ('icons/camera.jpeg' ),'Camera' , self )
110
+ cameraAction .setStatusTip ('Camera' )
111
+ cameraAction .triggered .connect (lambda : self .display (4 ))
104
112
# Widget actions ends ----------------------------------------
105
113
106
114
# Menu bar creation starts -----------------------------------
@@ -119,6 +127,7 @@ def __init__(self):
119
127
viewMenuWidget .addAction (screeenShotAction )
120
128
viewMenuWidget .addAction (playerAction )
121
129
viewMenuWidget .addAction (calculatorAction )
130
+ viewMenuWidget .addAction (cameraAction )
122
131
viewMenu .addMenu (viewMenuWidget )
123
132
124
133
helpMenu = menubar .addMenu ('&Help' )
@@ -134,6 +143,7 @@ def __init__(self):
134
143
self .toolbar2 .addAction (screeenShotAction )
135
144
self .toolbar2 .addAction (playerAction )
136
145
self .toolbar2 .addAction (calculatorAction )
146
+ self .toolbar2 .addAction (cameraAction )
137
147
138
148
self .toolbar3 = self .addToolBar ('Exit' )
139
149
self .toolbar3 .addAction (exitAction )
@@ -204,6 +214,12 @@ def stack4UI(self):
204
214
self .stack4 .setLayout (self .layout )
205
215
206
216
217
+ def stack5UI (self ):
218
+ self .layout = QHBoxLayout ()
219
+ self .layout .addWidget (Camera ())
220
+ self .stack5 .setLayout (self .layout )
221
+
222
+
207
223
def display (self ,i ):
208
224
self .Stack .setCurrentIndex (i )
209
225
# Stacked widgets added to layout end------------------------
@@ -255,7 +271,7 @@ def about(self):
255
271
pixmap = QPixmap ('icons/biohazard.svg' )
256
272
msg = QMessageBox (QMessageBox .Information , 'About Multitool' ,
257
273
"<b>Aplication name:</b> Multitool" +
258
- "<br> <b>Version:</b> V0.5 beta" +
274
+ "<br> <b>Version:</b> V0.6 beta" +
259
275
"<br><b>Description:</b> This application puts together many" +
260
276
"<br>widgets into a single application." +
261
277
"<br><b>Details:</b> Programmed and designed with Python 3.5 and PyQt5." +
0 commit comments