Date:2010-12-08 15:09:41 (9 years 6 months ago)
Author:kyak
Commit:fa4bfacd58001480909e406f1538c138268d37bb
Message:qstardict: initial port

Main window is adapted to fit 320x240. However, settings window is yet
to be adapted to look good
Files: qstardict/Makefile (1 diff)
qstardict/patches/001-qstardict.patch (1 diff)

Change Details

qstardict/Makefile
1#
2# This is free software, licensed under the GNU General Public License v2.
3# See /LICENSE for more information.
4#
5
6include $(TOPDIR)/rules.mk
7
8PKG_NAME:=qstardict
9PKG_VERSION:=0.13.1
10PKG_RELEASE:=1
11PKG_SOURCE_URL:=http://qstardict.ylsoftware.com/files/
12PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
13PKG_MD5SUM:=0828c3fa01c5237db8a67d356a9d1a8c
14
15include $(INCLUDE_DIR)/package.mk
16$(call include_mk,qmake.mk)
17
18define Package/qstardict
19    SECTION:=utils
20    CATEGORY:=Utilities
21    TITLE:=Qt clone of stardict
22    DEPENDS:=+qt4 +qt4-gui +dejavu-fonts-ttf +qt4-network +qt4-xml
23    URL:=http://qstardict.ylsoftware.com
24endef
25
26define Build/Prepare
27    $(call Build/Prepare/Default)
28    (\
29cd $(PKG_BUILD_DIR); \
30echo "QMAKE_UIC=$(STAGING_DIR_HOST)/bin/uic" >> qstardict.pri; \
31echo "QMAKE_MOC=$(STAGING_DIR_HOST)/bin/moc" >> qstardict.pri; \
32echo "QMAKE_RCC=$(STAGING_DIR_HOST)/bin/rcc" >> qstardict.pri; \
33echo "QMAKE_LINK=$(TARGET_CXX)" >> qstardict.pri; \
34echo "QMAKE_LIBS+=-L$(STAGING_DIR)/usr/lib/libintl/lib" >> qstardict.pri; \
35echo "QMAKE_LIBS+=-L$(STAGING_DIR)/usr/lib/libiconv/lib" >> qstardict.pri; \
36echo "QMAKE_LIBS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib" >> qstardict.pri; \
37echo "INCLUDEPATH += $(STAGING_DIR)/usr/include" >> qstardict.pri; \
38echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/Qt" >> qstardict.pri; \
39echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtGui" >> qstardict.pri; \
40echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtCore" >> qstardict.pri; \
41echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtNetwork" >> qstardict.pri; \
42echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtXml" >> qstardict.pri; \
43)
44endef
45
46define Build/Configure
47    $(call Build/Configure/Qmake,qstardict)
48endef
49
50define Package/qstardict/install
51    $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/qstardict/plugins
52    $(INSTALL_BIN) $(PKG_BUILD_DIR)/qstardict/qstardict $(1)/usr/bin/
53    $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/stardict/libstardict.so $(1)/usr/lib/qstardict/plugins
54    $(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/web/libweb.so $(1)/usr/lib/qstardict/plugins
55endef
56
57$(eval $(call BuildPackage,qstardict))
qstardict/patches/001-qstardict.patch
1diff -ur qstardict-0.13.1.or/qstardict/keyboard.cpp qstardict-0.13.1/qstardict/keyboard.cpp
2--- qstardict-0.13.1.or/qstardict/keyboard.cpp 2009-02-10 15:33:30.000000000 +0300
3@@ -82,7 +82,28 @@
4
5 } // namespace
6
7-#endif // Q_WS_WIN
8+#elif defined(Q_WS_QWS) // Q_WS_WIN
9+
10+namespace
11+{
12+const unsigned mAlt = 0010;
13+const unsigned mCtrl = 0004;
14+const unsigned mShift = 0001;
15+const unsigned mWin = 0100;
16+}
17+
18+namespace QStarDict
19+{
20+
21+Qt::KeyboardModifiers Keyboard::activeModifiers()
22+{
23+ Qt::KeyboardModifiers result;
24+ return result;
25+}
26+
27+} // namespace
28+
29+#endif // Q_WS_QWS
30
31 // vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab cindent textwidth=120 formatoptions=tc
32
33diff -ur qstardict-0.13.1.or/qstardict/mainwindow.ui qstardict-0.13.1/qstardict/mainwindow.ui
34--- qstardict-0.13.1.or/qstardict/mainwindow.ui 2009-02-10 15:33:30.000000000 +0300
35@@ -5,8 +5,8 @@
36    <rect>
37     <x>0</x>
38     <y>0</y>
39- <width>742</width>
40- <height>511</height>
41+ <width>320</width>
42+ <height>240</height>
43    </rect>
44   </property>
45   <property name="windowTitle" >
46@@ -19,15 +19,15 @@
47   <widget class="QWidget" name="centralwidget" >
48    <layout class="QGridLayout" >
49     <property name="margin" >
50- <number>9</number>
51+ <number>0</number>
52     </property>
53     <property name="spacing" >
54- <number>6</number>
55+ <number>0</number>
56     </property>
57     <item row="0" column="0" >
58      <layout class="QHBoxLayout" >
59       <property name="spacing" >
60- <number>6</number>
61+ <number>0</number>
62       </property>
63       <property name="margin" >
64        <number>0</number>
65@@ -90,17 +90,16 @@
66     <number>1</number>
67    </attribute>
68    <widget class="QWidget" name="dockWidgetContents" >
69- <layout class="QGridLayout" >
70- <property name="margin" >
71- <number>9</number>
72- </property>
73- <property name="spacing" >
74- <number>6</number>
75+ <widget class="QListWidget" name="wordsList" >
76+ <property name="geometry">
77+ <rect>
78+ <x>9</x>
79+ <y>9</y>
80+ <width>185</width>
81+ <height>184</height>
82+ </rect>
83      </property>
84- <item row="0" column="0" >
85- <widget class="QListWidget" name="wordsList" />
86- </item>
87- </layout>
88+ </widget>
89    </widget>
90   </widget>
91   <widget class="QMenuBar" name="menubar" >
92@@ -108,8 +107,8 @@
93     <rect>
94      <x>0</x>
95      <y>0</y>
96- <width>742</width>
97- <height>22</height>
98+ <width>320</width>
99+ <height>18</height>
100     </rect>
101    </property>
102    <widget class="QMenu" name="menu_File" >
103diff -ur qstardict-0.13.1.or/qstardict/settingsdialog.ui qstardict-0.13.1/qstardict/settingsdialog.ui
104--- qstardict-0.13.1.or/qstardict/settingsdialog.ui 2009-02-10 15:33:30.000000000 +0300
105@@ -5,8 +5,8 @@
106    <rect>
107     <x>0</x>
108     <y>0</y>
109- <width>463</width>
110- <height>498</height>
111+ <width>320</width>
112+ <height>240</height>
113    </rect>
114   </property>
115   <property name="windowTitle" >
116@@ -45,8 +45,8 @@
117        <rect>
118         <x>0</x>
119         <y>0</y>
120- <width>441</width>
121- <height>414</height>
122+ <width>320</width>
123+ <height>240</height>
124        </rect>
125       </property>
126       <attribute name="title" >
127@@ -104,8 +104,8 @@
128        <rect>
129         <x>0</x>
130         <y>0</y>
131- <width>441</width>
132- <height>414</height>
133+ <width>320</width>
134+ <height>240</height>
135        </rect>
136       </property>
137       <attribute name="title" >
138@@ -282,8 +282,8 @@
139        <rect>
140         <x>0</x>
141         <y>0</y>
142- <width>640</width>
143- <height>409</height>
144+ <width>320</width>
145+ <height>240</height>
146        </rect>
147       </property>
148       <attribute name="title" >
149@@ -565,8 +565,8 @@
150        <rect>
151         <x>0</x>
152         <y>0</y>
153- <width>640</width>
154- <height>409</height>
155+ <width>320</width>
156+ <height>240</height>
157        </rect>
158       </property>
159       <attribute name="title" >

Archive Download the corresponding diff file



interactive