kindle manager

This commit is contained in:
gavin
2020-06-03 21:08:07 +08:00
parent 0a4691062d
commit 68990a6411
50 changed files with 46083 additions and 239 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -50,6 +50,11 @@ b['1']['2'] = {'3':1} # OK
- reference - http://www.cocoachina.com/articles/89748
- pyQt5 reference - https://www.learnpyqt.com/
## 1.0.3 (20200603)
### feature
- design GUI with qdesigner ![kman GUI](https://i.loli.net/2020/06/03/wlFETiSCPmx29hI.png)
# feature plan
## 20200528
- first abstract from kindle hard / local directory for different OS

1
cui
View File

@@ -1 +1,2 @@
pyuic mainwindow.ui -o mainwindow.py
pyside2-rcc kman.qrc -o kmanrc.py

BIN
icons/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

BIN
icons/config.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
icons/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
icons/mail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
icons/md2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

BIN
icons/money2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
icons/money3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
icons/refresh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
icons/refresh2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
icons/search.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

BIN
icons/web.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

BIN
icons/write.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

44
kman.qrc Normal file
View File

@@ -0,0 +1,44 @@
<RCC>
<qresource prefix="/">
<file>icons/add.png</file>
<file>icons/books.png</file>
<file>icons/Cbb20.png</file>
<file>icons/config.png</file>
<file>icons/direction.png</file>
<file>icons/down.png</file>
<file>icons/downr.png</file>
<file>icons/dustbin.png</file>
<file>icons/fav.png</file>
<file>icons/file18.png</file>
<file>icons/folder.png</file>
<file>icons/home.png</file>
<file>icons/list.png</file>
<file>icons/mail.png</file>
<file>icons/md2.png</file>
<file>icons/money.png</file>
<file>icons/money2.png</file>
<file>icons/money3.png</file>
<file>icons/qq.png</file>
<file>icons/refresh2.png</file>
<file>icons/Safari.png</file>
<file>icons/search.jpeg</file>
<file>icons/share.png</file>
<file>icons/txt.png</file>
<file>icons/upgreen.png</file>
<file>icons/web.png</file>
<file>icons/webchat.png</file>
<file>icons/write.png</file>
<file>icons/yes.png</file>
<file>icons/addbook.png</file>
<file>icons/conf.png</file>
<file>icons/Drop Stuff.png</file>
<file>icons/flush.png</file>
<file>icons/foldup.png</file>
<file>icons/md.jpeg</file>
<file>icons/Pixadex.png</file>
<file>icons/question.png</file>
<file>icons/refresh.png</file>
<file>icons/statistics.png</file>
<file>mainwindow.ui</file>
</qresource>
</RCC>

View File

@@ -1,23 +1,76 @@
# This Python file uses the following encoding: utf-8
import sys
from PySide2.QtWidgets import QApplication
from PySide2.QtWidgets import QApplication
from PySide2.QtWidgets import QMainWindow
from mainwindow import Ui_MainWindow # 加载我们的布局
from mainwindow import Ui_MainWindow
class UsingTest(QMainWindow, Ui_MainWindow):
class kmanWindow(QMainWindow):
"""
def __init__(self, *args, **kwargs):
super(UsingTest, self).__init__(*args, **kwargs)
self.setupUi(self) # 初始化ui
# 在这里可以做一些UI的操作了或者是点击事件或者是别的
# 也可以另外写方法可以改变lable的内容
super(kmanWindow, self).__init__(*args, **kwargs)
"""
def __init__(self, parent=None):
super(kmanWindow, self).__init__(parent)
# create ui and initial it
ui = Ui_MainWindow()
ui.setupUi(self)
self.ui = ui
# connect action to slot functions
ui.actionimportkindle.triggered.connect(lambda: self.importkindle())
ui.actionimportlocal.triggered.connect(lambda: self.importlocal())
ui.actionconfig.triggered.connect(lambda: self.config())
ui.actionwords.triggered.connect(lambda: self.words())
ui.actionstatistic.triggered.connect(lambda: self.statistic())
ui.actionhomepage.triggered.connect(lambda: self.homepage())
ui.actionabout.triggered.connect(lambda: self.about())
ui.actionflush.triggered.connect(lambda: self.flush())
# define slot functions
def importkindle():
print("call slot importkindle()")
pass
def importlocal():
print("call slot importlocal()")
pass
def config():
print("call slot config()")
pass
def words():
print("call slot words()")
pass
def statistic():
print("call slot statistic()")
pass
def homepage():
print("call slot homepage()")
pass
def about():
print("call slot about()")
pass
def flush():
print("call slot flush()")
pass
def messageBox(self, showInfo):
box = QMessageBox.about(self, 'Kindle Management', showInfo)
if __name__ == "__main__":
import sys
from PySide2.QtWidgets import QApplication, QLabel
app = QApplication(sys.argv)
mw = UsingTest()
mw.show()
kmw = kmanWindow()
kmw.resize(900, 600)
kmw.show()
app.exec_()

View File

@@ -1,3 +1,3 @@
{
"files": ["kmanapp.py"]
"files": ["kmanapp.py","kman.qrc","mainwindow.ui"]
}

View File

@@ -1,175 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.2, 2020-06-01T15:27:58. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{fae58cf6-d2fe-464b-83cf-b657b7f31038}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop (x86-darwin-generic-mach_o-32bit)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop (x86-darwin-generic-mach_o-32bit)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{47431a9c-e34f-4b94-83d9-f5f98149f5e9}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
<value type="int" key="Analyzer.Perf.Frequency">250</value>
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
<value type="QString">-e</value>
<value type="QString">cpu-cycles</value>
<value type="QString">--call-graph</value>
<value type="QString">dwarf,4096</value>
<value type="QString">-F</value>
<value type="QString">250</value>
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">kmanapp</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">PythonEditor.RunConfiguration./Users/mark/kman/kmanapp.py</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/Users/mark/kman/kmanapp.py</value>
<value type="QString" key="PythonEditor.RunConfiguation.Interpreter">{db5d5c02-d4ed-4418-b2a9-60defdb75f1d}</value>
<value type="QString" key="PythonEditor.RunConfiguation.Script">/Users/mark/kman/kmanapp.py</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Users/mark/kman</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>

45707
kmanrc.py Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -20,49 +20,143 @@ class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(665, 385)
self.actionimport = QAction(MainWindow)
self.actionimport.setObjectName(u"actionimport")
MainWindow.resize(774, 410)
self.actionimportlocal = QAction(MainWindow)
self.actionimportlocal.setObjectName(u"actionimportlocal")
icon = QIcon()
iconThemeName = u"Ab6.png"
if QIcon.hasThemeIcon(iconThemeName):
icon = QIcon.fromTheme(iconThemeName)
else:
icon.addFile(u".", QSize(), QIcon.Normal, QIcon.Off)
self.actionimport.setIcon(icon)
self.actionimport_2 = QAction(MainWindow)
self.actionimport_2.setObjectName(u"actionimport_2")
icon.addFile(u"icons/downr.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionimportlocal.setIcon(icon)
self.actionimportkindle = QAction(MainWindow)
self.actionimportkindle.setObjectName(u"actionimportkindle")
icon1 = QIcon()
icon1.addFile(u"icons/Ab6.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionimport_2.setIcon(icon1)
self.actionimport_3 = QAction(MainWindow)
self.actionimport_3.setObjectName(u"actionimport_3")
icon1.addFile(u"icons/down.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionimportkindle.setIcon(icon1)
self.actionconfig = QAction(MainWindow)
self.actionconfig.setObjectName(u"actionconfig")
icon2 = QIcon()
icon2.addFile(u"icons/Ab10.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionimport_3.setIcon(icon2)
icon2.addFile(u"icons/config.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionconfig.setIcon(icon2)
self.actionflush = QAction(MainWindow)
self.actionflush.setObjectName(u"actionflush")
icon3 = QIcon()
icon3.addFile(u"icons/refresh.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionflush.setIcon(icon3)
self.actionwords = QAction(MainWindow)
self.actionwords.setObjectName(u"actionwords")
icon4 = QIcon()
icon4.addFile(u"icons/books.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionwords.setIcon(icon4)
self.actionstatistic = QAction(MainWindow)
self.actionstatistic.setObjectName(u"actionstatistic")
icon5 = QIcon()
icon5.addFile(u"icons/statistics.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionstatistic.setIcon(icon5)
self.actionhomepage = QAction(MainWindow)
self.actionhomepage.setObjectName(u"actionhomepage")
icon6 = QIcon()
icon6.addFile(u"icons/home.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionhomepage.setIcon(icon6)
self.actionabout = QAction(MainWindow)
self.actionabout.setObjectName(u"actionabout")
icon7 = QIcon()
icon7.addFile(u"icons/question.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionabout.setIcon(icon7)
self.actionsearch = QAction(MainWindow)
self.actionsearch.setObjectName(u"actionsearch")
icon8 = QIcon()
icon8.addFile(u"icons/Pixadex.png", QSize(), QIcon.Normal, QIcon.Off)
self.actionsearch.setIcon(icon8)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.horizontalLayout = QHBoxLayout()
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.searchLabel = QLabel(self.centralwidget)
self.searchLabel.setObjectName(u"searchLabel")
self.horizontalLayout.addWidget(self.searchLabel)
self.searchLineEdit = QLineEdit(self.centralwidget)
self.searchLineEdit.setObjectName(u"searchLineEdit")
self.horizontalLayout.addWidget(self.searchLineEdit)
self.searchComboBox = QComboBox(self.centralwidget)
self.searchComboBox.setObjectName(u"searchComboBox")
self.horizontalLayout.addWidget(self.searchComboBox)
self.searchToolButton = QToolButton(self.centralwidget)
self.searchToolButton.setObjectName(u"searchToolButton")
icon9 = QIcon()
icon9.addFile(u"icons/search.jpeg", QSize(), QIcon.Normal, QIcon.Off)
self.searchToolButton.setIcon(icon9)
self.horizontalLayout.addWidget(self.searchToolButton)
self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
self.splitter_2 = QSplitter(self.centralwidget)
self.splitter_2.setObjectName(u"splitter_2")
self.splitter_2.setOrientation(Qt.Horizontal)
self.treeView = QTreeView(self.splitter_2)
self.treeView.setObjectName(u"treeView")
sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.treeView.sizePolicy().hasHeightForWidth())
self.treeView.setSizePolicy(sizePolicy)
self.treeView.setMaximumSize(QSize(400, 16777215))
self.splitter_2.addWidget(self.treeView)
self.splitter = QSplitter(self.splitter_2)
self.splitter.setObjectName(u"splitter")
self.splitter.setOrientation(Qt.Vertical)
self.tableView = QTableView(self.splitter)
self.tableView.setObjectName(u"tableView")
sizePolicy1 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Expanding)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.tableView.sizePolicy().hasHeightForWidth())
self.tableView.setSizePolicy(sizePolicy1)
self.splitter.addWidget(self.tableView)
self.textEdit = QTextEdit(self.splitter)
self.textEdit.setObjectName(u"textEdit")
sizePolicy2 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(1)
sizePolicy2.setHeightForWidth(self.textEdit.sizePolicy().hasHeightForWidth())
self.textEdit.setSizePolicy(sizePolicy2)
self.textEdit.setMaximumSize(QSize(16777215, 400))
self.splitter.addWidget(self.textEdit)
self.splitter_2.addWidget(self.splitter)
self.gridLayout.addWidget(self.splitter_2, 1, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QStatusBar(MainWindow)
self.statusbar.setObjectName(u"statusbar")
MainWindow.setStatusBar(self.statusbar)
self.menuBar = QMenuBar(MainWindow)
self.menuBar.setObjectName(u"menuBar")
self.menuBar.setGeometry(QRect(0, 0, 774, 22))
MainWindow.setMenuBar(self.menuBar)
self.toolBar = QToolBar(MainWindow)
self.toolBar.setObjectName(u"toolBar")
MainWindow.addToolBar(Qt.TopToolBarArea, self.toolBar)
self.menuBar = QMenuBar(MainWindow)
self.menuBar.setObjectName(u"menuBar")
self.menuBar.setGeometry(QRect(0, 0, 665, 22))
self.menuImport = QMenu(self.menuBar)
self.menuImport.setObjectName(u"menuImport")
MainWindow.setMenuBar(self.menuBar)
self.toolBar.addAction(self.actionimport)
self.toolBar.addAction(self.actionimport_2)
self.toolBar.addAction(self.actionimport_3)
self.menuBar.addAction(self.menuImport.menuAction())
self.menuImport.addAction(self.actionimport_2)
self.menuImport.addAction(self.actionimport_3)
self.toolBar.addAction(self.actionimportkindle)
self.toolBar.addAction(self.actionimportlocal)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionconfig)
self.toolBar.addAction(self.actionwords)
self.toolBar.addAction(self.actionstatistic)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionhomepage)
self.toolBar.addAction(self.actionabout)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionflush)
self.retranslateUi(MainWindow)
@@ -70,17 +164,45 @@ class Ui_MainWindow(object):
# setupUi
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
self.actionimport.setText(QCoreApplication.translate("MainWindow", u"Import", None))
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Kindle Management", None))
self.actionimportlocal.setText(QCoreApplication.translate("MainWindow", u"importlocal", None))
#if QT_CONFIG(tooltip)
self.actionimport.setToolTip(QCoreApplication.translate("MainWindow", u"import clipping file from kindle", None))
self.actionimportlocal.setToolTip(QCoreApplication.translate("MainWindow", u"import clipping file from local clipping file", None))
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(shortcut)
self.actionimport.setShortcut(QCoreApplication.translate("MainWindow", u"Meta+I", None))
#endif // QT_CONFIG(shortcut)
self.actionimport_2.setText(QCoreApplication.translate("MainWindow", u"import", None))
self.actionimport_3.setText(QCoreApplication.translate("MainWindow", u"import", None))
self.actionimportkindle.setText(QCoreApplication.translate("MainWindow", u"importkindle", None))
#if QT_CONFIG(tooltip)
self.actionimportkindle.setToolTip(QCoreApplication.translate("MainWindow", u"import clipping file from kindle", None))
#endif // QT_CONFIG(tooltip)
self.actionconfig.setText(QCoreApplication.translate("MainWindow", u"config", None))
#if QT_CONFIG(tooltip)
self.actionconfig.setToolTip(QCoreApplication.translate("MainWindow", u"configuration", None))
#endif // QT_CONFIG(tooltip)
self.actionflush.setText(QCoreApplication.translate("MainWindow", u"flush", None))
#if QT_CONFIG(tooltip)
self.actionflush.setToolTip(QCoreApplication.translate("MainWindow", u"flush import file", None))
#endif // QT_CONFIG(tooltip)
self.actionwords.setText(QCoreApplication.translate("MainWindow", u"words", None))
#if QT_CONFIG(tooltip)
self.actionwords.setToolTip(QCoreApplication.translate("MainWindow", u"words", None))
#endif // QT_CONFIG(tooltip)
self.actionstatistic.setText(QCoreApplication.translate("MainWindow", u"statistic", None))
#if QT_CONFIG(tooltip)
self.actionstatistic.setToolTip(QCoreApplication.translate("MainWindow", u"statistics reading habbit", None))
#endif // QT_CONFIG(tooltip)
self.actionhomepage.setText(QCoreApplication.translate("MainWindow", u"homepage", None))
#if QT_CONFIG(tooltip)
self.actionhomepage.setToolTip(QCoreApplication.translate("MainWindow", u"redirect to my homepage", None))
#endif // QT_CONFIG(tooltip)
self.actionabout.setText(QCoreApplication.translate("MainWindow", u"about", None))
#if QT_CONFIG(tooltip)
self.actionabout.setToolTip(QCoreApplication.translate("MainWindow", u"open about dialog", None))
#endif // QT_CONFIG(tooltip)
self.actionsearch.setText(QCoreApplication.translate("MainWindow", u"search", None))
#if QT_CONFIG(tooltip)
self.actionsearch.setToolTip(QCoreApplication.translate("MainWindow", u"search note", None))
#endif // QT_CONFIG(tooltip)
self.searchLabel.setText(QCoreApplication.translate("MainWindow", u"Search", None))
self.searchToolButton.setText(QCoreApplication.translate("MainWindow", u"...", None))
self.toolBar.setWindowTitle(QCoreApplication.translate("MainWindow", u"toolBar", None))
self.menuImport.setTitle(QCoreApplication.translate("MainWindow", u"Import", None))
# retranslateUi

View File

@@ -6,21 +6,100 @@
<rect>
<x>0</x>
<y>0</y>
<width>665</width>
<height>385</height>
<width>774</width>
<height>410</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
<string>Kindle Management</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="searchLabel">
<property name="text">
<string>Search</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="searchLineEdit"/>
</item>
<item>
<widget class="QComboBox" name="searchComboBox"/>
</item>
<item>
<widget class="QToolButton" name="searchToolButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset>
<normaloff>icons/search.jpeg</normaloff>icons/search.jpeg</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QSplitter" name="splitter_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTreeView" name="treeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>16777215</height>
</size>
</property>
</widget>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTableView" name="tableView">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QTextEdit" name="textEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>400</height>
</size>
</property>
</widget>
</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>665</width>
<width>774</width>
<height>22</height>
</rect>
</property>
@@ -38,11 +117,19 @@
<addaction name="actionimportkindle"/>
<addaction name="actionimportlocal"/>
<addaction name="separator"/>
<addaction name="actionconfig"/>
<addaction name="actionwords"/>
<addaction name="actionstatistic"/>
<addaction name="separator"/>
<addaction name="actionhomepage"/>
<addaction name="actionabout"/>
<addaction name="separator"/>
<addaction name="actionflush"/>
</widget>
<action name="actionimportlocal">
<property name="icon">
<iconset>
<normaloff>icons/Ab9.png</normaloff>icons/Ab9.png</iconset>
<normaloff>icons/downr.png</normaloff>icons/downr.png</iconset>
</property>
<property name="text">
<string>importlocal</string>
@@ -54,7 +141,7 @@
<action name="actionimportkindle">
<property name="icon">
<iconset>
<normaloff>icons/Ab5.png</normaloff>icons/Ab5.png</iconset>
<normaloff>icons/down.png</normaloff>icons/down.png</iconset>
</property>
<property name="text">
<string>importkindle</string>
@@ -66,7 +153,7 @@
<action name="actionconfig">
<property name="icon">
<iconset>
<normaloff>icons/conf.png</normaloff>icons/conf.png</iconset>
<normaloff>icons/config.png</normaloff>icons/config.png</iconset>
</property>
<property name="text">
<string>config</string>
@@ -78,7 +165,7 @@
<action name="actionflush">
<property name="icon">
<iconset>
<normaloff>icons/iSync.png</normaloff>icons/iSync.png</iconset>
<normaloff>icons/refresh.png</normaloff>icons/refresh.png</iconset>
</property>
<property name="text">
<string>flush</string>
@@ -90,7 +177,7 @@
<action name="actionwords">
<property name="icon">
<iconset>
<normaloff>icons/Ar18.png</normaloff>icons/Ar18.png</iconset>
<normaloff>icons/books.png</normaloff>icons/books.png</iconset>
</property>
<property name="text">
<string>words</string>
@@ -102,7 +189,7 @@
<action name="actionstatistic">
<property name="icon">
<iconset>
<normaloff>icons/81.png</normaloff>icons/81.png</iconset>
<normaloff>icons/statistics.png</normaloff>icons/statistics.png</iconset>
</property>
<property name="text">
<string>statistic</string>
@@ -114,7 +201,7 @@
<action name="actionhomepage">
<property name="icon">
<iconset>
<normaloff>icons/direction.png</normaloff>icons/direction.png</iconset>
<normaloff>icons/home.png</normaloff>icons/home.png</iconset>
</property>
<property name="text">
<string>homepage</string>
@@ -126,7 +213,7 @@
<action name="actionabout">
<property name="icon">
<iconset>
<normaloff>icons/60.png</normaloff>icons/60.png</iconset>
<normaloff>icons/question.png</normaloff>icons/question.png</iconset>
</property>
<property name="text">
<string>about</string>