Skip to content

Commit

Permalink
init LCD Tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jax committed Apr 8, 2022
0 parents commit bfdbce4
Show file tree
Hide file tree
Showing 26 changed files with 1,057 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
dist/
__pycache__/
*.pyc
261 changes: 261 additions & 0 deletions MainWindow.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
<?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>640</width>
<height>480</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>640</width>
<height>480</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>640</width>
<height>480</height>
</size>
</property>
<property name="windowTitle">
<string>QYTECH LCD Tools</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="et_font_path">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_select_font">
<property name="text">
<string>FontFamily</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cb_font_size">
<property name="text">
<string>FontSize</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimum">
<number>8</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="value">
<number>16</number>
</property>
<property name="displayIntegerBase">
<number>10</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="et_message">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maxLength">
<number>4</number>
</property>
<property name="placeholderText">
<string>Please input text</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_transform">
<property name="text">
<string>transform</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="iv_image">
<property name="minimumSize">
<size>
<width>48</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>48</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>640</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>640</width>
<height>200</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QPlainTextEdit" name="tv_lcd">
<property name="geometry">
<rect>
<x>90</x>
<y>0</y>
<width>460</width>
<height>200</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>460</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>460</width>
<height>200</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="btn_copy">
<property name="geometry">
<rect>
<x>460</x>
<y>10</y>
<width>81</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>copy</string>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
<addaction name="action_select_image"/>
</widget>
<addaction name="menuFile"/>
</widget>
<action name="action_select_image">
<property name="text">
<string>open</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# LCDTools

LCDTools is a tool for text and image to lcd bitmap array .

![LCDTools](docs/img/LCDTools.png)

## Text to LCD

Default Input text and click transform you can preview result and get lcd bitmap array .

![test](docs/img/text2lcd_test.png)
![测试](docs/img/text2lcd_%E6%B5%8B%E8%AF%95.png)
![テスト](docs/img/text2lcd_%E3%83%86%E3%82%B9%E3%83%88.png)
![시험](docs/img/text2lcd_%EC%8B%9C%ED%97%98.png)

If you want to specify the size or font of the text you can do the following

![font01](docs/img/text2lcd_font01.png)
![font02](docs/img/text2lcd_font02.png)

## Image to LCD

You can also convert mainstream photos to corresponding LCD

![image2lcd](docs/img/image2lcd01.png)

![image2lcd](docs/img/image2lcd.png)
Loading

0 comments on commit bfdbce4

Please sign in to comment.