Skip to content

Commit

Permalink
Multitool V0.7 beta - Adding tetrix
Browse files Browse the repository at this point in the history
  • Loading branch information
FDJ-Dash committed Jan 24, 2018
1 parent d71171f commit fee0aa1
Show file tree
Hide file tree
Showing 12 changed files with 544 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.pyc
log.txt
*.log
__pycache__/
bin/
lib/
pip-selfcheck.json
include/
ignoreFolder/
30 changes: 26 additions & 4 deletions Multitool.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This program puts together multiple widgets
on a single application.
Version: 0.6 beta
Version: 0.7 beta
Author: Fernando Daniel Jaime
Last edited: January 2018
Expand All @@ -25,6 +25,7 @@
FrameProcessor, HistogramWidget, Player)
from calculator.calculator import Button, Calculator
from camera.camera import Camera, ImageSettings, VideoSettings
from tetrix.tetrix import TetrixWindow, TetrixBoard, TetrixPiece


class Multitool(QMainWindow, QWidget):
Expand All @@ -44,19 +45,22 @@ def __init__(self):
self.stack3 = QWidget() # Player
self.stack4 = QWidget() # Calculator
self.stack5 = QWidget() # Camera
self.stack6 = QWidget() # Tetrix

self.stack1UI() # Mouse Clicker
self.stack2UI() # Screenshot
self.stack3UI() # Player
self.stack4UI() # Calculator
self.stack5UI() # Camera
self.stack6UI() # Tetrix

self.Stack = QStackedWidget (self)
self.Stack.addWidget (self.stack1) # Mouse Clicker
self.Stack.addWidget (self.stack2) # Screenshot
self.Stack.addWidget (self.stack3) # Player
self.Stack.addWidget (self.stack4) # Calculator
self.Stack.addWidget (self.stack5) # Camera
self.Stack.addWidget (self.stack6) # Tetrix

# General actions starts -------------------------------------
exitAction = QAction(QIcon('icons/exit.png'), '&Exit', self)
Expand Down Expand Up @@ -109,6 +113,10 @@ def __init__(self):
cameraAction = QAction(QIcon('icons/camera.jpeg'),'Camera', self)
cameraAction.setStatusTip('Camera')
cameraAction.triggered.connect(lambda: self.display(4))

tetrixAction = QAction(QIcon('icons/tetrix.png'),'Tetrix', self)
tetrixAction.setStatusTip('Tetrix')
tetrixAction.triggered.connect(lambda: self.display(5))
# Widget actions ends ----------------------------------------

# Menu bar creation starts -----------------------------------
Expand All @@ -130,6 +138,9 @@ def __init__(self):
viewMenuWidget.addAction(cameraAction)
viewMenu.addMenu(viewMenuWidget)

gamesMenu = menubar.addMenu('&Games')
gamesMenu.addAction(tetrixAction)

helpMenu = menubar.addMenu('&Help')
helpMenu.addAction(aboutAction)
# Menu bar creation ends -------------------------------------
Expand All @@ -145,8 +156,11 @@ def __init__(self):
self.toolbar2.addAction(calculatorAction)
self.toolbar2.addAction(cameraAction)

self.toolbar3 = self.addToolBar('Exit')
self.toolbar3.addAction(exitAction)
self.toolbar3 = self.addToolBar('Games')
self.toolbar3.addAction(tetrixAction)

self.toolbar4 = self.addToolBar('Exit')
self.toolbar4.addAction(exitAction)
# Toolbar creation ends -------------------------------------

self.setCentralWidget(self.Stack)
Expand All @@ -168,10 +182,12 @@ def toggleToolBar(self, state):
self.toolbar1.show()
self.toolbar2.show()
self.toolbar3.show()
self.toolbar4.show()
else:
self.toolbar1.hide()
self.toolbar2.hide()
self.toolbar3.hide()
self.toolbar4.hide()


def minimizeToTray(self, state):
Expand Down Expand Up @@ -220,6 +236,12 @@ def stack5UI(self):
self.stack5.setLayout(self.layout)


def stack6UI(self):
self.layout = QHBoxLayout()
self.layout.addWidget(TetrixWindow())
self.stack6.setLayout(self.layout)


def display(self,i):
self.Stack.setCurrentIndex(i)
# Stacked widgets added to layout end------------------------
Expand Down Expand Up @@ -271,7 +293,7 @@ def about(self):
pixmap = QPixmap('icons/biohazard.svg')
msg = QMessageBox(QMessageBox.Information, 'About Multitool',
"<b>Aplication name:</b> Multitool" +
"<br> <b>Version:</b> V0.6 beta" +
"<br> <b>Version:</b> V0.7 beta" +
"<br><b>Description:</b> This application puts together many" +
"<br>widgets into a single application." +
"<br><b>Details:</b> Programmed and designed with Python 3.5 and PyQt5." +
Expand Down
Binary file added Multitool_calculator.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Multitool_camera.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Multitool_clicker.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Multitool_player.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Multitool_screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Multitool_tetrix.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Multitool_tetrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/tetrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
olefile==0.44
Pillow==4.3.0
PyQt5==5.9.2
sip==4.19.6
six==1.11.0
Loading

0 comments on commit fee0aa1

Please sign in to comment.