Skip to content

Commit da21dc5

Browse files
committed
Added about page
1 parent 02b43dd commit da21dc5

File tree

7 files changed

+411
-35
lines changed

7 files changed

+411
-35
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ Using python3 and PyQt4
99
## 2. Solve dependencies
1010

1111
2.1 Copy phantomjs executable in ./bin to /usr/bin/, or just add it to PATH.
12-
This is the Linux 64 version, download the corresponding version of phantomjs
13-
from official website if you'd like run it on other platform.)
12+
phantomjs executable can be downloaded from [here](https://bitbucket.org/ariya/phantomjs/downloads)
1413

15-
2.2 Install depend packages through python pip
16-
17-
depend packages: selenium futures requests
18-
19-
## 3. Usage
20-
21-
Change keywords and options in main.py, then run it !
14+
2.2 solve requirements.txt
15+
pip install -r requirements.txt
2216

17+
## 3. Windows bundled executable binary.
18+
Download prebuilt windows binary from [here](https://github.com/sczhengyabin/Google-Image-Downloader/releases)

about.ui

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>Dialog_about</class>
4+
<widget class="QDialog" name="Dialog_about">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>600</width>
10+
<height>200</height>
11+
</rect>
12+
</property>
13+
<property name="sizePolicy">
14+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
15+
<horstretch>0</horstretch>
16+
<verstretch>0</verstretch>
17+
</sizepolicy>
18+
</property>
19+
<property name="windowTitle">
20+
<string>Dialog</string>
21+
</property>
22+
<layout class="QGridLayout" name="gridLayout" columnstretch="1,2,11,1">
23+
<item row="0" column="1">
24+
<spacer name="verticalSpacer_2">
25+
<property name="orientation">
26+
<enum>Qt::Vertical</enum>
27+
</property>
28+
<property name="sizeHint" stdset="0">
29+
<size>
30+
<width>20</width>
31+
<height>43</height>
32+
</size>
33+
</property>
34+
</spacer>
35+
</item>
36+
<item row="1" column="1">
37+
<widget class="QLabel" name="label">
38+
<property name="font">
39+
<font>
40+
<pointsize>10</pointsize>
41+
</font>
42+
</property>
43+
<property name="text">
44+
<string>Author:</string>
45+
</property>
46+
<property name="alignment">
47+
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
48+
</property>
49+
</widget>
50+
</item>
51+
<item row="1" column="2">
52+
<widget class="QLineEdit" name="lineEdit">
53+
<property name="sizePolicy">
54+
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
55+
<horstretch>0</horstretch>
56+
<verstretch>0</verstretch>
57+
</sizepolicy>
58+
</property>
59+
<property name="font">
60+
<font>
61+
<pointsize>10</pointsize>
62+
</font>
63+
</property>
64+
<property name="focusPolicy">
65+
<enum>Qt::NoFocus</enum>
66+
</property>
67+
<property name="text">
68+
<string>Yabin Zheng</string>
69+
</property>
70+
<property name="cursorPosition">
71+
<number>0</number>
72+
</property>
73+
<property name="readOnly">
74+
<bool>true</bool>
75+
</property>
76+
</widget>
77+
</item>
78+
<item row="2" column="0">
79+
<spacer name="horizontalSpacer">
80+
<property name="orientation">
81+
<enum>Qt::Horizontal</enum>
82+
</property>
83+
<property name="sizeHint" stdset="0">
84+
<size>
85+
<width>34</width>
86+
<height>20</height>
87+
</size>
88+
</property>
89+
</spacer>
90+
</item>
91+
<item row="2" column="1">
92+
<widget class="QLabel" name="label_3">
93+
<property name="font">
94+
<font>
95+
<pointsize>10</pointsize>
96+
</font>
97+
</property>
98+
<property name="text">
99+
<string>Email:</string>
100+
</property>
101+
<property name="alignment">
102+
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
103+
</property>
104+
</widget>
105+
</item>
106+
<item row="2" column="2">
107+
<widget class="QLineEdit" name="lineEdit_2">
108+
<property name="sizePolicy">
109+
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
110+
<horstretch>0</horstretch>
111+
<verstretch>0</verstretch>
112+
</sizepolicy>
113+
</property>
114+
<property name="font">
115+
<font>
116+
<pointsize>10</pointsize>
117+
</font>
118+
</property>
119+
<property name="focusPolicy">
120+
<enum>Qt::NoFocus</enum>
121+
</property>
122+
<property name="text">
123+
<string>sczhengyabin@hotmail.com</string>
124+
</property>
125+
<property name="cursorPosition">
126+
<number>0</number>
127+
</property>
128+
<property name="readOnly">
129+
<bool>true</bool>
130+
</property>
131+
</widget>
132+
</item>
133+
<item row="2" column="3">
134+
<spacer name="horizontalSpacer_2">
135+
<property name="orientation">
136+
<enum>Qt::Horizontal</enum>
137+
</property>
138+
<property name="sizeHint" stdset="0">
139+
<size>
140+
<width>34</width>
141+
<height>20</height>
142+
</size>
143+
</property>
144+
</spacer>
145+
</item>
146+
<item row="3" column="1">
147+
<widget class="QLabel" name="label_5">
148+
<property name="font">
149+
<font>
150+
<pointsize>10</pointsize>
151+
</font>
152+
</property>
153+
<property name="text">
154+
<string>Project Home:</string>
155+
</property>
156+
<property name="alignment">
157+
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
158+
</property>
159+
</widget>
160+
</item>
161+
<item row="3" column="2">
162+
<widget class="QLineEdit" name="lineEdit_3">
163+
<property name="sizePolicy">
164+
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
165+
<horstretch>0</horstretch>
166+
<verstretch>0</verstretch>
167+
</sizepolicy>
168+
</property>
169+
<property name="font">
170+
<font>
171+
<pointsize>10</pointsize>
172+
</font>
173+
</property>
174+
<property name="focusPolicy">
175+
<enum>Qt::NoFocus</enum>
176+
</property>
177+
<property name="text">
178+
<string>https://github.com/sczhengyabin/Google-Image-Downloader</string>
179+
</property>
180+
<property name="cursorPosition">
181+
<number>0</number>
182+
</property>
183+
<property name="readOnly">
184+
<bool>true</bool>
185+
</property>
186+
</widget>
187+
</item>
188+
<item row="4" column="1">
189+
<spacer name="verticalSpacer">
190+
<property name="orientation">
191+
<enum>Qt::Vertical</enum>
192+
</property>
193+
<property name="sizeHint" stdset="0">
194+
<size>
195+
<width>20</width>
196+
<height>42</height>
197+
</size>
198+
</property>
199+
</spacer>
200+
</item>
201+
</layout>
202+
</widget>
203+
<resources/>
204+
<connections/>
205+
</ui>

mainwindow.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
# -*- coding: utf-8 -*-
22

33
from ui_mainwindow import Ui_MainWindow
4-
4+
from ui_about import Ui_Dialog_about
55
import utils
66

77
from PyQt4.Qt import *
88
from PyQt4.QtTest import QTest
9-
from multiprocessing import Process
109
from threading import Thread
1110
import shlex
1211
import os
13-
import sys
1412

1513
import image_downloader
1614
from logger import logger
1715

1816

17+
class DialogAbout(QDialog, Ui_Dialog_about):
18+
def __init__(self):
19+
QDialog.__init__(self)
20+
self.setupUi(self)
21+
22+
1923
class MainWindow(QMainWindow, Ui_MainWindow):
2024
def __init__(self):
2125
logger.log_hooks.append(self.log)
@@ -25,6 +29,8 @@ def __init__(self):
2529

2630
self.setupUi(self)
2731

32+
self.dialog_about = DialogAbout()
33+
2834
self.state = "stop"
2935

3036
self.elapsed_timer = QElapsedTimer()
@@ -38,6 +44,8 @@ def __init__(self):
3844
self.process_log_timer.timeout.connect(self.progress_log)
3945
self.process_log_timer.start()
4046

47+
self.actionAbout.triggered.connect(self.dialog_about.show)
48+
4149
self.pushButton_load_file.clicked.connect(
4250
lambda: self.lineEdit_path2file.setText(QFileDialog.getOpenFileName(
4351
self, "Load keywords from file", "./", "Text files (*.txt)")))

0 commit comments

Comments
 (0)