projects
/
mdictionary
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9427983
)
some change
author
jakub
<jakub.jaszczynski@comarch.com>
Mon, 28 Feb 2011 10:13:53 +0000
(11:13 +0100)
committer
jakub
<jakub.jaszczynski@comarch.com>
Mon, 28 Feb 2011 10:13:53 +0000
(11:13 +0100)
src/mdictionary/gui/SearchBarWidget.cpp
patch
|
blob
|
history
src/mdictionary/qml/DictManagerWidget.qml
patch
|
blob
|
history
src/mdictionary/qml/StarDictDialog.qml
patch
|
blob
|
history
src/mdictionary/qml/WordListWidget.qml
patch
|
blob
|
history
src/mdictionary/qml/XdxfDialog.qml
patch
|
blob
|
history
src/plugins/xdxf/XdxfDictDownloadProgressDialog.cpp
patch
|
blob
|
history
diff --git
a/src/mdictionary/gui/SearchBarWidget.cpp
b/src/mdictionary/gui/SearchBarWidget.cpp
index
da482d0
..
7e9e16d
100644
(file)
--- a/
src/mdictionary/gui/SearchBarWidget.cpp
+++ b/
src/mdictionary/gui/SearchBarWidget.cpp
@@
-153,7
+153,6
@@
SearchBarWidget::~SearchBarWidget() {
}
void SearchBarWidget::checkFocus(){
}
void SearchBarWidget::checkFocus(){
- qDebug()<<"focus:"<<QApplication::focusWidget();
if(focusWidget()!=QApplication::focusWidget())
emit focusOff();
}
if(focusWidget()!=QApplication::focusWidget())
emit focusOff();
}
@@
-203,7
+202,6
@@
void SearchBarWidget::prevCompleter(){
QString tempString;
if(!preferedCompliter.isEmpty()){
int index = completerActualList.indexOf(preferedCompliter);
QString tempString;
if(!preferedCompliter.isEmpty()){
int index = completerActualList.indexOf(preferedCompliter);
- qDebug()<<"index"<<index<<"size"<<completerActualList.size()<<"+1";
if(index!=-1 && completerActualList.size()>index+1){
preferedCompliter = completerActualList.at(index+1);
tempString=preferedCompliter;
if(index!=-1 && completerActualList.size()>index+1){
preferedCompliter = completerActualList.at(index+1);
tempString=preferedCompliter;
@@
-228,7
+226,6
@@
void SearchBarWidget::nextCompleter(){
QIcon SearchBarWidget::generateIcon(QIcon original, qreal rotation) {
QIcon SearchBarWidget::generateIcon(QIcon original, qreal rotation) {
- qDebug()<<"test2";
QPixmap p = original.pixmap(64);
if(rotation != 0) {
QPixmap p = original.pixmap(64);
if(rotation != 0) {
@@
-273,7
+270,6
@@
void SearchBarWidget::setFocus() {
}
void SearchBarWidget::initializeUI() {
}
void SearchBarWidget::initializeUI() {
- qDebug()<<"test4";
#ifdef Q_WS_MAEMO_5
setMaximumHeight(150);
#ifdef Q_WS_MAEMO_5
setMaximumHeight(150);
@@
-374,7
+370,6
@@
void SearchBarWidget::initializeUI() {
}
void SearchBarWidget::searchButtonClicked(QString text) {
}
void SearchBarWidget::searchButtonClicked(QString text) {
- qDebug()<<"test5";
if(busy)
Q_EMIT stopSearching();
else
if(busy)
Q_EMIT stopSearching();
else
@@
-382,7
+377,6
@@
void SearchBarWidget::searchButtonClicked(QString text) {
}
void SearchBarWidget::searchPushButtonClicked() {
}
void SearchBarWidget::searchPushButtonClicked() {
- qDebug()<<"test6";
#ifdef Q_WS_MAEMO_5
if(busy) {
Q_EMIT stopSearching();
#ifdef Q_WS_MAEMO_5
if(busy) {
Q_EMIT stopSearching();
@@
-412,7
+406,6
@@
void SearchBarWidget::search(QString word) {
}
void SearchBarWidget::searchDelay(QString word) {
}
void SearchBarWidget::searchDelay(QString word) {
- qDebug()<<"test8";
if(!busy && !word.isEmpty()) {
#ifndef Q_WS_MAEMO_5
emit setLineEditText(word);
if(!busy && !word.isEmpty()) {
#ifndef Q_WS_MAEMO_5
emit setLineEditText(word);
@@
-428,7
+421,6
@@
void SearchBarWidget::searchDelay(QString word) {
}
void SearchBarWidget::delaySearchTimeout() {
}
void SearchBarWidget::delaySearchTimeout() {
- qDebug()<<"test9";
delayTimer.stop();
if(!busy) {
Q_EMIT searchForTranslations(delayString);
delayTimer.stop();
if(!busy) {
Q_EMIT searchForTranslations(delayString);
@@
-436,11
+428,9
@@
void SearchBarWidget::delaySearchTimeout() {
}
void SearchBarWidget::setEnabled(bool enabled) {
}
void SearchBarWidget::setEnabled(bool enabled) {
- qDebug()<<"test10";
#ifndef Q_WS_MAEMO_5
emit setLineEditEnables(enabled);
if(!enabled) {
#ifndef Q_WS_MAEMO_5
emit setLineEditEnables(enabled);
if(!enabled) {
- qDebug()<<"tu???";
emit setEnableHistoryNext(false);
emit setEnableHistoryShow(false);
emit setEnableHistoryPrev(false);
emit setEnableHistoryNext(false);
emit setEnableHistoryShow(false);
emit setEnableHistoryPrev(false);
@@
-453,11
+443,9
@@
void SearchBarWidget::setEnabled(bool enabled) {
historyShowToolButton->setEnabled(false);
}
#endif
historyShowToolButton->setEnabled(false);
}
#endif
-qDebug()<<"tu2???";
}
void SearchBarWidget::setBusy() {
}
void SearchBarWidget::setBusy() {
- qDebug()<<"test11";
if(busy) return;
#ifndef Q_WS_MAEMO_5
if(busy) return;
#ifndef Q_WS_MAEMO_5
@@
-480,7
+468,6
@@
void SearchBarWidget::setBusy() {
}
void SearchBarWidget::updateBusyTimer(){
}
void SearchBarWidget::updateBusyTimer(){
- qDebug()<<"test12";
if(progressMax==true){
emit progresSetValue2(0);
progressMax=false;
if(progressMax==true){
emit progresSetValue2(0);
progressMax=false;
@@
-493,7
+480,6
@@
void SearchBarWidget::updateBusyTimer(){
}
void SearchBarWidget::setIdle() {
}
void SearchBarWidget::setIdle() {
- qDebug()<<"test13";
if(!busy) return;
#ifndef Q_WS_MAEMO_5
progressBar->hide();
if(!busy) return;
#ifndef Q_WS_MAEMO_5
progressBar->hide();
@@
-512,7
+498,6
@@
void SearchBarWidget::setIdle() {
void SearchBarWidget::clearSearchWordToolButtonClicked() {
void SearchBarWidget::clearSearchWordToolButtonClicked() {
- qDebug()<<"test14";
#ifdef Q_WS_MAEMO_5
searchWordLineEdit->clear();
#endif
#ifdef Q_WS_MAEMO_5
searchWordLineEdit->clear();
#endif
@@
-521,7
+506,6
@@
void SearchBarWidget::clearSearchWordToolButtonClicked() {
void SearchBarWidget::updateHistoryButtons(bool prev, bool next, bool list) {
void SearchBarWidget::updateHistoryButtons(bool prev, bool next, bool list) {
- qDebug()<<"test15";
if(!busy) {
#ifndef Q_WS_MAEMO_5
emit setEnableHistoryNext(next);
if(!busy) {
#ifndef Q_WS_MAEMO_5
emit setEnableHistoryNext(next);
@@
-536,7
+520,6
@@
void SearchBarWidget::updateHistoryButtons(bool prev, bool next, bool list) {
}
void SearchBarWidget::showHistoryButtonClicked() {
}
void SearchBarWidget::showHistoryButtonClicked() {
- qDebug()<<"test16";
#ifndef Q_WS_MAEMO_5
QPoint p=view->pos(); // = historyShowToolButton->pos();
p=mapToGlobal(p);
#ifndef Q_WS_MAEMO_5
QPoint p=view->pos(); // = historyShowToolButton->pos();
p=mapToGlobal(p);
diff --git
a/src/mdictionary/qml/DictManagerWidget.qml
b/src/mdictionary/qml/DictManagerWidget.qml
index
df43918
..
86adbed
100644
(file)
--- a/
src/mdictionary/qml/DictManagerWidget.qml
+++ b/
src/mdictionary/qml/DictManagerWidget.qml
@@
-111,7
+111,6
@@
Rectangle {
model: dictModel
}
model: dictModel
}
- //buttons
Item {
id: buttonsBox
Item {
id: buttonsBox
diff --git
a/src/mdictionary/qml/StarDictDialog.qml
b/src/mdictionary/qml/StarDictDialog.qml
index
2291d11
..
b283f61
100644
(file)
--- a/
src/mdictionary/qml/StarDictDialog.qml
+++ b/
src/mdictionary/qml/StarDictDialog.qml
@@
-34,7
+34,6
@@
Rectangle{
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
color : myPalette.window;
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
color : myPalette.window;
-
Text {
id: textInfo
text: "Tekst: "
Text {
id: textInfo
text: "Tekst: "
diff --git
a/src/mdictionary/qml/WordListWidget.qml
b/src/mdictionary/qml/WordListWidget.qml
index
288cbaf
..
9383549
100644
(file)
--- a/
src/mdictionary/qml/WordListWidget.qml
+++ b/
src/mdictionary/qml/WordListWidget.qml
@@
-25,6
+25,9
@@
import Qt 4.7
Rectangle {
import Qt 4.7
Rectangle {
+ id: rectangle1
+ color: myPalette.base
+ anchors.fill: parent
function changeWordState(nr, state) {
wordList.currentIndex = nr
function changeWordState(nr, state) {
wordList.currentIndex = nr
@@
-35,14
+38,10
@@
Rectangle {
function setEnabled(Boolean) { wordList.enabled = Boolean } // slot
signal wordSelected(string word);
function setEnabled(Boolean) { wordList.enabled = Boolean } // slot
signal wordSelected(string word);
-
+ signal checkFocus();
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
- id: rectangle1
- color: myPalette.base
- anchors.fill: parent
-
ElementsListView{
id: wordList
width: rectangle1.width
ElementsListView{
id: wordList
width: rectangle1.width
@@
-53,6
+52,8
@@
Rectangle {
delegate: Component{
id: wordListDelegate
Item {
delegate: Component{
id: wordListDelegate
Item {
+ onActiveFocusChanged: rectangle1.checkFocus();
+
width: rectangle1.width
height: {
if (wordText.height + 4 > check.height)
width: rectangle1.width
height: {
if (wordText.height + 4 > check.height)
@@
-60,10
+61,10
@@
Rectangle {
else
return check.height;
}
else
return check.height;
}
-
MouseArea{
anchors.fill: parent
MouseArea{
anchors.fill: parent
- onClicked: {
+ onClicked: wordList.currentIndex = number
+ onDoubleClicked: {
wordList.currentIndex = number
rectangle1.wordSelected(word)
}
wordList.currentIndex = number
rectangle1.wordSelected(word)
}
@@
-103,11
+104,17
@@
Rectangle {
}
}
}
}
}
}
-
}
}
-
}
model: wordModel
}
}
model: wordModel
}
+
+ states: [
+ State {
+ name: "noFocus";
+ when: ((!wordList.focus) && (!rectangle1.focus))
+ PropertyChanges { target: wordList.highlightItem; opacity:0}
+ }
+ ]
}
}
diff --git
a/src/mdictionary/qml/XdxfDialog.qml
b/src/mdictionary/qml/XdxfDialog.qml
index
e16180b
..
1b2a960
100644
(file)
--- a/
src/mdictionary/qml/XdxfDialog.qml
+++ b/
src/mdictionary/qml/XdxfDialog.qml
@@
-96,7
+96,7
@@
Rectangle{
Text {
id: textInfo
width: rectangle1.width
Text {
id: textInfo
width: rectangle1.width
- height: paintedHeight+5;
+ height: (paintedHeight+5)>150?150:paintedHeight+5;
text: ": "
wrapMode: Text.Wrap;
anchors.top: textDescription.bottom
text: ": "
wrapMode: Text.Wrap;
anchors.top: textDescription.bottom
@@
-105,13
+105,26
@@
Rectangle{
font.pixelSize: 12
}
font.pixelSize: 12
}
+
+ Rectangle {
+ anchors.right: parent.right
+ anchors.left: parent.left
+ anchors.bottom: saveButton.bottom
+ anchors.top: optimalizeCheckbox.top
+
+ id: rectangle2
+ color: myPalette.window
+ anchors.topMargin: -2
+ }
+
Checkbox {
id: optimalizeCheckbox
width: 20
height: 20
Checkbox {
id: optimalizeCheckbox
width: 20
height: 20
+ anchors.bottom: stripCheckbox.top
+ anchors.bottomMargin: 5
anchors.left: parent.left
anchors.leftMargin: 5
anchors.left: parent.left
anchors.leftMargin: 5
- anchors.top: textInfo.bottom
onChanged: rectangle1.optimalizeCheckboxChanged(selected);
}
onChanged: rectangle1.optimalizeCheckboxChanged(selected);
}
@@
-119,8
+132,8
@@
Rectangle{
id: stripCheckbox
width: 20
height: 20
id: stripCheckbox
width: 20
height: 20
- anchors.top: optimalizeCheckbox.bottom
- anchors.topMargin: 5
+ anchors.bottom: saveButton.top
+ anchors.bottomMargin: 15
anchors.horizontalCenter: optimalizeCheckbox.horizontalCenter
onChanged: rectangle1.stripCheckboxChanged(selected);
}
anchors.horizontalCenter: optimalizeCheckbox.horizontalCenter
onChanged: rectangle1.stripCheckboxChanged(selected);
}
@@
-151,9
+164,8
@@
Rectangle{
Button {
id: saveButton
height: 30
Button {
id: saveButton
height: 30
+ anchors.bottom: parent.bottom
textInButton: qsTr("Save")
textInButton: qsTr("Save")
- anchors.top: stripCheckbox.bottom
- anchors.topMargin: 10
anchors.right: parent.right
anchors.left: parent.left
onClicked: rectangle1.saveButtonClicked();
anchors.right: parent.right
anchors.left: parent.left
onClicked: rectangle1.saveButtonClicked();
@@
-200,6
+212,7
@@
Rectangle{
onClicked: rectangle1.downloadButtonClicked();
}
onClicked: rectangle1.downloadButtonClicked();
}
+
states: [
State {
name: "Stan1"
states: [
State {
name: "Stan1"
diff --git
a/src/plugins/xdxf/XdxfDictDownloadProgressDialog.cpp
b/src/plugins/xdxf/XdxfDictDownloadProgressDialog.cpp
index
5bf2ca7
..
e37032c
100644
(file)
--- a/
src/plugins/xdxf/XdxfDictDownloadProgressDialog.cpp
+++ b/
src/plugins/xdxf/XdxfDictDownloadProgressDialog.cpp
@@
-29,7
+29,6
@@
XdxfDictDownloadProgressDialog::XdxfDictDownloadProgressDialog(QWidget*parent):
QDialog(parent) {
XdxfDictDownloadProgressDialog::XdxfDictDownloadProgressDialog(QWidget*parent):
QDialog(parent) {
-qDebug()<<"etap 01";
#ifndef Q_WS_MAEMO_5
view= new QDeclarativeView();
view->setSource(QUrl::fromLocalFile("/usr/share/mdictionary/qml/XdxfDictDownloader.qml"));
#ifndef Q_WS_MAEMO_5
view= new QDeclarativeView();
view->setSource(QUrl::fromLocalFile("/usr/share/mdictionary/qml/XdxfDictDownloader.qml"));
@@
-85,7
+84,6
@@
qDebug()<<"etap 01";
void XdxfDictDownloadProgressDialog::show() {
void XdxfDictDownloadProgressDialog::show() {
-qDebug()<<"etap 02";
#ifndef Q_WS_MAEMO_5
emit setMaximumValue(0);
maximumValue=0;
#ifndef Q_WS_MAEMO_5
emit setMaximumValue(0);
maximumValue=0;
@@
-98,8
+96,6
@@
qDebug()<<"etap 02";
void XdxfDictDownloadProgressDialog::setText(QString text) {
void XdxfDictDownloadProgressDialog::setText(QString text) {
-qDebug()<<"etap 03";
-
#ifndef Q_WS_MAEMO_5
emit setTextt(text);
#else
#ifndef Q_WS_MAEMO_5
emit setTextt(text);
#else
@@
-125,7
+121,6
@@
qDebug()<<"etap 04";
void XdxfDictDownloadProgressDialog::reject() {
void XdxfDictDownloadProgressDialog::reject() {
-qDebug()<<"etap 05";
#ifndef Q_WS_MAEMO_5
Q_EMIT cancelDownloading();
#else
#ifndef Q_WS_MAEMO_5
Q_EMIT cancelDownloading();
#else