comarchNote = "<center>Maemo/Meego Multilingual Dictionary</center>";
comarchNote += "<center>Copyright 2006-2010, Comarch S.A. <br>";
comarchNote += "<a href=\"http://mdictionary.garage.maemo.org\">"
- "http://mdictionary.garage.maemo.org</a></center>";
+ "http://mdictionary.garage.maemo.org</a>";
+ comarchNote += "<br/><font size=\"small\"><a href=\"https://garage.maemo.org/tracker/?func=add&group_id=58&atid=305\">"
+ "Report bug</a></font></center>";
licenseNote = QString("<br><p><font size=\"small\">This program is free"
"software: you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as"
setWindowTitle(tr("About"));
mainLayout = new QVBoxLayout;
+ /*on desktop we place all content in scroll area, on maemo by default all
+ widgets that are in menu are placed in scroll area created by menu, so we
+ don't have to do it here*/
#ifndef Q_WS_MAEMO_5
scrollLayout = new QVBoxLayout;
scroll = new QScrollArea;
w = new QWidget(this);
-
#endif
mainLayout->addWidget(mainLabel, 0, Qt::AlignHCenter);
mainLayout->addWidget(licenseLabel, 0, Qt::AlignHCenter);
-
+ //add content to scroll area, and remove fram from it
#ifndef Q_WS_MAEMO_5
w->setLayout(mainLayout);
scroll->setWidget(w);
#else
setLayout(mainLayout);
#endif
-
-
-
-
-
}
settingsWidget = new SettingsWidget(this);
settingsWidget->hide();
+ connect(settingsWidget, SIGNAL(notify(Notify::NotifyType,QString)),
+ this, SLOT(showNotification(Notify::NotifyType,QString)));
+
bookmarksWidget = new BookmarksWidget(this);
bookmarksWidget->hide();
verticalLayout = new QVBoxLayout;
setLayout(verticalLayout);
- historySizeSpinBox = new QSpinBox;
- searchResultSizeSpinBox = new QSpinBox;
- limitTip = tr("Limits maximum number of found words, affects only when "
- "searching in file.");
- searchResultSizeSpinBox->setToolTip(limitTip);
+ historySizeLayout = new QHBoxLayout;
+ historySizeSpinBox = new SpinBox;
+ historySizeSpinBox->setMinimum(1);
+ historySizeSpinBox->setMaximum(50);
- spinBoxesFormLayout = new QFormLayout;
- spinBoxesFormLayout->addRow(tr("Search result size"),
- searchResultSizeSpinBox);
- spinBoxesFormLayout->addRow(tr("History size"),
- historySizeSpinBox);
+ historySizeToolTip = tr("Limits maximum number of words saved in history");
+
+ #ifdef Q_WS_MAEMO_5
+ historySizeInfoToolButton = new QToolButton;
+ historySizeInfoToolButton->setIcon(QIcon::fromTheme("general_information"));
+ #endif
+
+ historySizeLayout->addWidget(historySizeSpinBox);
+ #ifdef Q_WS_MAEMO_5
+ historySizeLayout->addWidget(historySizeInfoToolButton);
+ #endif
+
+
+
+ searchResultLayout = new QHBoxLayout;
+
+ searchResultSizeSpinBox = new SpinBox;
searchResultSizeSpinBox->setMinimum(0);
+ searchResultSizeSpinBox->setMaximum(500);
searchResultSizeSpinBox->setSpecialValueText(tr("Unlimited"));
- historySizeSpinBox->setMinimum(1);
- searchResultSizeSpinBox->setMaximum(500);
- historySizeSpinBox->setMaximum(50);
+ searchResultSizeToolTip = tr("Limits maximum number of found words, affects"
+ "only when searching in file.");
+
+ #ifdef Q_WS_MAEMO_5
+ searchResultSizeInfoToolButton = new QToolButton;
+ searchResultSizeInfoToolButton->setIcon(QIcon::fromTheme("general_information"));
+ #endif
+ searchResultLayout->addWidget(searchResultSizeSpinBox);
#ifdef Q_WS_MAEMO_5
- verticalLayout->addSpacing(20);
+ searchResultLayout->addWidget(searchResultSizeInfoToolButton);
#endif
+
+
+
+
+
+ spinBoxesFormLayout = new QFormLayout;
+ spinBoxesFormLayout->addRow(tr("Search result size"),
+ searchResultLayout);
+ spinBoxesFormLayout->addRow(tr("History size"),
+ historySizeLayout);
+
+
+
+
verticalLayout->addLayout(spinBoxesFormLayout);
SLOT(changed()));
+#ifdef Q_WS_MAEMO_5
+ connect(searchResultSizeInfoToolButton, SIGNAL(clicked()),
+ this, SLOT(showSearchResultSizeInfo()));
+
+ connect(historySizeInfoToolButton, SIGNAL(clicked()),
+ this, SLOT(showHistorySizeInfo()));
+#else
+ historySizeSpinBox->setToolTip(historySizeToolTip);
+ searchResultSizeSpinBox->setToolTip(searchResultSizeToolTip);
+#endif
+
+
settings = 0;
#ifndef Q_WS_MAEMO_5
hide();
}
#endif
+
+
+#ifdef Q_WS_MAEMO_5
+ void SettingsWidget::showHistorySizeInfo() {
+ Q_EMIT notify(Notify::Warning, historySizeToolTip);
+ }
+
+ void SettingsWidget::showSearchResultSizeInfo() {
+ Q_EMIT notify(Notify::Warning, searchResultSizeToolTip);
+ }
+#endif
#include <QPushButton>
#include "../../include/GUIInterface.h"
#include "../../include/settings.h"
+#include "SpinBox.h"
//! Implements applications settings widget
/*!
*/
explicit SettingsWidget(GUIInterface *parent = 0);
+Q_SIGNALS:
+ void notify(Notify::NotifyType, QString);
protected:
void showEvent(QShowEvent *);
#ifndef Q_WS_MAEMO_5
void save();
#endif
+ #ifdef Q_WS_MAEMO_5
+ void showSearchResultSizeInfo();
+ void showHistorySizeInfo();
+ #endif
private:
void initalizeUI();
- QSpinBox* historySizeSpinBox;
- QSpinBox* searchResultSizeSpinBox;
+ SpinBox* historySizeSpinBox;
+ SpinBox* searchResultSizeSpinBox;
QVBoxLayout* verticalLayout;
QFormLayout* spinBoxesFormLayout;
+ QHBoxLayout* historySizeLayout;
+ QHBoxLayout* searchResultLayout;
+
+ #ifdef Q_WS_MAEMO_5
+ QToolButton* historySizeInfoToolButton;
+ QToolButton* searchResultSizeInfoToolButton;
+ #endif
QLabel* checkBoxesLabel;
QCheckBox* searchInDictionariesCheckBox;
QCheckBox* searchInBookmarksCheckBox;
+
GUIInterface* guiInterface;
Settings* settings;
bool _changed;
- QString limitTip;
+
+ QString searchResultSizeToolTip;
+ QString historySizeToolTip;
+
#ifndef Q_WS_MAEMO_5
QPushButton* closeButton;
QHBoxLayout* footerLayout;
--- /dev/null
+/*******************************************************************************
+
+ This file is part of mDictionary.
+
+ mDictionary is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ mDictionary is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with mDictionary. If not, see <http://www.gnu.org/licenses/>.
+
+ Copyright 2010 Comarch S.A.
+
+*******************************************************************************/
+
+//Created by Mateusz Półrola
+
+#include "SpinBox.h"
+
+SpinBox::SpinBox(QWidget *parent) :
+ QSpinBox(parent)
+{
+ QLineEdit* le = lineEdit();
+ le->setEnabled(false);
+}
--- /dev/null
+/*******************************************************************************
+
+ This file is part of mDictionary.
+
+ mDictionary is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ mDictionary is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with mDictionary. If not, see <http://www.gnu.org/licenses/>.
+
+ Copyright 2010 Comarch S.A.
+
+*******************************************************************************/
+
+//Created by Mateusz Półrola
+
+#ifndef SPINBOX_H
+#define SPINBOX_H
+
+#include <QtGui>
+
+class SpinBox : public QSpinBox
+{
+ Q_OBJECT
+public:
+ explicit SpinBox(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // SPINBOX_H
gui/AboutWidget.cpp \
gui/TranslationTextEdit.cpp \
gui/DBusAdapter.cpp \
- gui/NotifyManager.cpp
+ gui/NotifyManager.cpp \
+ gui/SpinBox.cpp
HEADERS += gui/MainWindow.h \
backbone/ConfigGenerator.h \
../include/AccentsNormalizer.h \
../include/DictDialog.h \
gui/DBusAdapter.h \
- gui/NotifyManager.h
+ gui/NotifyManager.h \
+ gui/SpinBox.h
RESOURCES += ../../data/gui.qrc