1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-25 15:58:08 +02:00

qstardict: initial port

Main window is adapted to fit 320x240. However, settings window is yet
to be adapted to look good
This commit is contained in:
kyak 2010-12-08 17:09:41 +03:00
parent 6c23e13ef2
commit fa4bfacd58
2 changed files with 219 additions and 0 deletions

57
qstardict/Makefile Normal file
View File

@ -0,0 +1,57 @@
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=qstardict
PKG_VERSION:=0.13.1
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://qstardict.ylsoftware.com/files/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_MD5SUM:=0828c3fa01c5237db8a67d356a9d1a8c
include $(INCLUDE_DIR)/package.mk
$(call include_mk,qmake.mk)
define Package/qstardict
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Qt clone of stardict
DEPENDS:=+qt4 +qt4-gui +dejavu-fonts-ttf +qt4-network +qt4-xml
URL:=http://qstardict.ylsoftware.com
endef
define Build/Prepare
$(call Build/Prepare/Default)
(\
cd $(PKG_BUILD_DIR); \
echo "QMAKE_UIC=$(STAGING_DIR_HOST)/bin/uic" >> qstardict.pri; \
echo "QMAKE_MOC=$(STAGING_DIR_HOST)/bin/moc" >> qstardict.pri; \
echo "QMAKE_RCC=$(STAGING_DIR_HOST)/bin/rcc" >> qstardict.pri; \
echo "QMAKE_LINK=$(TARGET_CXX)" >> qstardict.pri; \
echo "QMAKE_LIBS+=-L$(STAGING_DIR)/usr/lib/libintl/lib" >> qstardict.pri; \
echo "QMAKE_LIBS+=-L$(STAGING_DIR)/usr/lib/libiconv/lib" >> qstardict.pri; \
echo "QMAKE_LIBS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib" >> qstardict.pri; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include" >> qstardict.pri; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/Qt" >> qstardict.pri; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtGui" >> qstardict.pri; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtCore" >> qstardict.pri; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtNetwork" >> qstardict.pri; \
echo "INCLUDEPATH += $(STAGING_DIR)/usr/include/QtXml" >> qstardict.pri; \
)
endef
define Build/Configure
$(call Build/Configure/Qmake,qstardict)
endef
define Package/qstardict/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/qstardict/plugins
$(INSTALL_BIN) $(PKG_BUILD_DIR)/qstardict/qstardict $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/stardict/libstardict.so $(1)/usr/lib/qstardict/plugins
$(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/web/libweb.so $(1)/usr/lib/qstardict/plugins
endef
$(eval $(call BuildPackage,qstardict))

View File

@ -0,0 +1,162 @@
diff -ur qstardict-0.13.1.or/qstardict/keyboard.cpp qstardict-0.13.1/qstardict/keyboard.cpp
--- qstardict-0.13.1.or/qstardict/keyboard.cpp 2009-02-10 15:33:30.000000000 +0300
+++ qstardict-0.13.1/qstardict/keyboard.cpp 2010-12-07 21:52:31.613898108 +0300
@@ -82,7 +82,28 @@
} // namespace
-#endif // Q_WS_WIN
+#elif defined(Q_WS_QWS) // Q_WS_WIN
+
+namespace
+{
+const unsigned mAlt = 0010;
+const unsigned mCtrl = 0004;
+const unsigned mShift = 0001;
+const unsigned mWin = 0100;
+}
+
+namespace QStarDict
+{
+
+Qt::KeyboardModifiers Keyboard::activeModifiers()
+{
+ Qt::KeyboardModifiers result;
+ return result;
+}
+
+} // namespace
+
+#endif // Q_WS_QWS
// vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab cindent textwidth=120 formatoptions=tc
diff -ur qstardict-0.13.1.or/qstardict/mainwindow.ui qstardict-0.13.1/qstardict/mainwindow.ui
--- qstardict-0.13.1.or/qstardict/mainwindow.ui 2009-02-10 15:33:30.000000000 +0300
+++ qstardict-0.13.1/qstardict/mainwindow.ui 2010-12-08 16:40:21.843773360 +0300
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>742</width>
- <height>511</height>
+ <width>320</width>
+ <height>240</height>
</rect>
</property>
<property name="windowTitle" >
@@ -19,15 +19,15 @@
<widget class="QWidget" name="centralwidget" >
<layout class="QGridLayout" >
<property name="margin" >
- <number>9</number>
+ <number>0</number>
</property>
<property name="spacing" >
- <number>6</number>
+ <number>0</number>
</property>
<item row="0" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >
- <number>6</number>
+ <number>0</number>
</property>
<property name="margin" >
<number>0</number>
@@ -90,17 +90,16 @@
<number>1</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
+ <widget class="QListWidget" name="wordsList" >
+ <property name="geometry">
+ <rect>
+ <x>9</x>
+ <y>9</y>
+ <width>185</width>
+ <height>184</height>
+ </rect>
</property>
- <item row="0" column="0" >
- <widget class="QListWidget" name="wordsList" />
- </item>
- </layout>
+ </widget>
</widget>
</widget>
<widget class="QMenuBar" name="menubar" >
@@ -108,8 +107,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>742</width>
- <height>22</height>
+ <width>320</width>
+ <height>18</height>
</rect>
</property>
<widget class="QMenu" name="menu_File" >
diff -ur qstardict-0.13.1.or/qstardict/settingsdialog.ui qstardict-0.13.1/qstardict/settingsdialog.ui
--- qstardict-0.13.1.or/qstardict/settingsdialog.ui 2009-02-10 15:33:30.000000000 +0300
+++ qstardict-0.13.1/qstardict/settingsdialog.ui 2010-12-08 10:27:03.160773247 +0300
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>463</width>
- <height>498</height>
+ <width>320</width>
+ <height>240</height>
</rect>
</property>
<property name="windowTitle" >
@@ -45,8 +45,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>441</width>
- <height>414</height>
+ <width>320</width>
+ <height>240</height>
</rect>
</property>
<attribute name="title" >
@@ -104,8 +104,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>441</width>
- <height>414</height>
+ <width>320</width>
+ <height>240</height>
</rect>
</property>
<attribute name="title" >
@@ -282,8 +282,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>640</width>
- <height>409</height>
+ <width>320</width>
+ <height>240</height>
</rect>
</property>
<attribute name="title" >
@@ -565,8 +565,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>640</width>
- <height>409</height>
+ <width>320</width>
+ <height>240</height>
</rect>
</property>
<attribute name="title" >