Skip to content

Commit

Permalink
feat(ocr): Add New Method for Rename Peta Analog
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenusdy committed Feb 27, 2024
1 parent e1107f4 commit 715b450
Show file tree
Hide file tree
Showing 2 changed files with 388 additions and 0 deletions.
134 changes: 134 additions & 0 deletions ui/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'main.ui'
#
# Created by: PyQt5 UI code generator 5.15.10
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(501, 315)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.radio_OCR = QtWidgets.QRadioButton(self.centralwidget)
self.radio_OCR.setGeometry(QtCore.QRect(170, 30, 82, 17))
font = QtGui.QFont()
font.setPointSize(12)
self.radio_OCR.setFont(font)
self.radio_OCR.setObjectName("radio_OCR")
self.radio_QR = QtWidgets.QRadioButton(self.centralwidget)
self.radio_QR.setGeometry(QtCore.QRect(260, 30, 101, 16))
font = QtGui.QFont()
font.setPointSize(12)
self.radio_QR.setFont(font)
self.radio_QR.setObjectName("radio_QR")
self.input_path = QtWidgets.QTextEdit(self.centralwidget)
self.input_path.setGeometry(QtCore.QRect(170, 50, 301, 31))
font = QtGui.QFont()
font.setPointSize(12)
self.input_path.setFont(font)
self.input_path.setObjectName("input_path")
self.output_path = QtWidgets.QTextEdit(self.centralwidget)
self.output_path.setGeometry(QtCore.QRect(170, 90, 301, 31))
font = QtGui.QFont()
font.setPointSize(12)
self.output_path.setFont(font)
self.output_path.setObjectName("output_path")
self.progressBar = QtWidgets.QProgressBar(self.centralwidget)
self.progressBar.setGeometry(QtCore.QRect(170, 160, 291, 31))
font = QtGui.QFont()
font.setPointSize(12)
self.progressBar.setFont(font)
self.progressBar.setProperty("value", 24)
self.progressBar.setObjectName("progressBar")
self.button_proses = QtWidgets.QPushButton(self.centralwidget)
self.button_proses.setGeometry(QtCore.QRect(380, 220, 91, 41))
font = QtGui.QFont()
font.setPointSize(12)
self.button_proses.setFont(font)
self.button_proses.setObjectName("button_proses")
self.label_metode = QtWidgets.QLabel(self.centralwidget)
self.label_metode.setGeometry(QtCore.QRect(20, 30, 101, 21))
font = QtGui.QFont()
font.setPointSize(12)
self.label_metode.setFont(font)
self.label_metode.setObjectName("label_metode")
self.label_folder_input = QtWidgets.QLabel(self.centralwidget)
self.label_folder_input.setGeometry(QtCore.QRect(20, 60, 121, 21))
font = QtGui.QFont()
font.setPointSize(12)
self.label_folder_input.setFont(font)
self.label_folder_input.setObjectName("label_folder_input")
self.label_folder_output = QtWidgets.QLabel(self.centralwidget)
self.label_folder_output.setGeometry(QtCore.QRect(20, 90, 121, 21))
font = QtGui.QFont()
font.setPointSize(12)
self.label_folder_output.setFont(font)
self.label_folder_output.setObjectName("label_folder_output")
self.label_proses = QtWidgets.QLabel(self.centralwidget)
self.label_proses.setGeometry(QtCore.QRect(20, 130, 81, 21))
font = QtGui.QFont()
font.setPointSize(12)
self.label_proses.setFont(font)
self.label_proses.setObjectName("label_proses")
self.label_file_current = QtWidgets.QLabel(self.centralwidget)
self.label_file_current.setGeometry(QtCore.QRect(170, 130, 81, 21))
font = QtGui.QFont()
font.setPointSize(12)
self.label_file_current.setFont(font)
self.label_file_current.setObjectName("label_file_current")
self.label_progressBar = QtWidgets.QLabel(self.centralwidget)
self.label_progressBar.setGeometry(QtCore.QRect(20, 160, 111, 31))
font = QtGui.QFont()
font.setPointSize(12)
self.label_progressBar.setFont(font)
self.label_progressBar.setObjectName("label_progressBar")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 501, 21))
self.menubar.setObjectName("menubar")
self.menuMain = QtWidgets.QMenu(self.menubar)
self.menuMain.setObjectName("menuMain")
self.menuAbout = QtWidgets.QMenu(self.menubar)
self.menuAbout.setObjectName("menuAbout")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.menubar.addAction(self.menuMain.menuAction())
self.menubar.addAction(self.menuAbout.menuAction())

self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)

def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.radio_OCR.setText(_translate("MainWindow", "OCR"))
self.radio_QR.setText(_translate("MainWindow", "QR-Code"))
self.button_proses.setText(_translate("MainWindow", "Proses"))
self.label_metode.setText(_translate("MainWindow", "Metode"))
self.label_folder_input.setText(_translate("MainWindow", "Folder Input"))
self.label_folder_output.setText(_translate("MainWindow", "Folder Output"))
self.label_proses.setText(_translate("MainWindow", "Proses"))
self.label_file_current.setText(_translate("MainWindow", "Proses"))
self.label_progressBar.setText(_translate("MainWindow", "Progress Bar"))
self.menuMain.setTitle(_translate("MainWindow", "Main"))
self.menuAbout.setTitle(_translate("MainWindow", "About"))


if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())
254 changes: 254 additions & 0 deletions ui/main.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>501</width>
<height>315</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QRadioButton" name="radio_OCR">
<property name="geometry">
<rect>
<x>170</x>
<y>30</y>
<width>82</width>
<height>17</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>OCR</string>
</property>
</widget>
<widget class="QRadioButton" name="radio_QR">
<property name="geometry">
<rect>
<x>260</x>
<y>30</y>
<width>101</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>QR-Code</string>
</property>
</widget>
<widget class="QTextEdit" name="input_path">
<property name="geometry">
<rect>
<x>170</x>
<y>50</y>
<width>301</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
<widget class="QTextEdit" name="output_path">
<property name="geometry">
<rect>
<x>170</x>
<y>90</y>
<width>301</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
<widget class="QProgressBar" name="progressBar">
<property name="geometry">
<rect>
<x>170</x>
<y>160</y>
<width>291</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="value">
<number>24</number>
</property>
</widget>
<widget class="QPushButton" name="button_proses">
<property name="geometry">
<rect>
<x>380</x>
<y>220</y>
<width>91</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Proses</string>
</property>
</widget>
<widget class="QLabel" name="label_metode">
<property name="geometry">
<rect>
<x>20</x>
<y>30</y>
<width>101</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Metode</string>
</property>
</widget>
<widget class="QLabel" name="label_folder_input">
<property name="geometry">
<rect>
<x>20</x>
<y>60</y>
<width>121</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Folder Input</string>
</property>
</widget>
<widget class="QLabel" name="label_folder_output">
<property name="geometry">
<rect>
<x>20</x>
<y>90</y>
<width>121</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Folder Output</string>
</property>
</widget>
<widget class="QLabel" name="label_proses">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<width>81</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Proses</string>
</property>
</widget>
<widget class="QLabel" name="label_file_current">
<property name="geometry">
<rect>
<x>170</x>
<y>130</y>
<width>81</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Proses</string>
</property>
</widget>
<widget class="QLabel" name="label_progressBar">
<property name="geometry">
<rect>
<x>20</x>
<y>160</y>
<width>111</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Progress Bar</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>501</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuMain">
<property name="title">
<string>Main</string>
</property>
</widget>
<widget class="QMenu" name="menuAbout">
<property name="title">
<string>About</string>
</property>
</widget>
<addaction name="menuMain"/>
<addaction name="menuAbout"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

0 comments on commit 715b450

Please sign in to comment.