*/
void addBookmark(QList<Translation*> translations) {
foreach(Translation* translation, translations)
- _bookmarks.add(translation);
- //QtConcurrent::run(&bookmarks, &Bookmarks::add, translation);
+ //_bookmarks.add(translation);
+ QtConcurrent::run(_bookmarks, &Bookmarks::add, translation);
}
{
QString infoNote, licenseNote, comarchNote;
infoNote = "<center><h2><u>mDictionary</u></h2></center>";
+ infoNote += "<br><a href=\"http://mdictionary.garage.maemo.org/\"/>";
infoNote += "<center>Meamo/Meego Mulitlingual Dictionary</center>";
comarchNote = "<center>Copyright 2006-2010, Comarch S.A. </center>";
licenseNote = "<br /><p><font size=\"small\">This program is free software: you can redistribute it and/or modify\n"
--- /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 "BookmarksWidget.h"
+
+BookmarksWidget::BookmarksWidget(GUIInterface *parent) :
+ QDialog(parent)
+{
+ setWindowTitle(tr("Bookmarks"));
+
+ verticalLayout = new QVBoxLayout;
+ setLayout(verticalLayout);
+
+ showAllBookmarksPushButton = new QPushButton(tr("Show all bookmarks"));
+ removeAllBookmarksPushButton =
+ new QPushButton(tr("Remove all bookmarks"));
+
+ verticalLayout->addWidget(showAllBookmarksPushButton);
+ verticalLayout->addWidget(removeAllBookmarksPushButton);
+
+ connect(showAllBookmarksPushButton, SIGNAL(clicked()),
+ this, SIGNAL(showAllBookmarks()));
+
+ connect(removeAllBookmarksPushButton, SIGNAL(clicked()),
+ this, SIGNAL(removeAllBookmarks()));
+}
--- /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 BOOKMARKSWIDGET_H
+#define BOOKMARKSWIDGET_H
+
+#include <QDialog>
+#include <QtGui>
+#include "../../includes/GUIInterface.h"
+
+class BookmarksWidget : public QDialog
+{
+ Q_OBJECT
+public:
+ explicit BookmarksWidget(GUIInterface *parent = 0);
+
+Q_SIGNALS:
+ void showAllBookmarks();
+ void removeAllBookmarks();
+
+private:
+ QPushButton* showAllBookmarksPushButton;
+ QPushButton* removeAllBookmarksPushButton;
+ QVBoxLayout* verticalLayout;
+
+};
+
+#endif // BOOKMARKSWIDGET_H
int i = ui->centralWidget->layout()->indexOf(welcomeScreenWidget);
QBoxLayout* l = (QBoxLayout*)(ui->centralWidget->layout());
l->removeWidget(welcomeScreenWidget);
+ welcomeScreenWidget->deleteLater();
l->insertWidget(0, wordListWidget);
qDebug()<<"changed";
}
void MainWindow::showAllBookmarks() {
- qDebug()<<"asdas";
+ menuWidget->hideMenu();
+ backbone->fetchBookmarks();
}
void MainWindow::connectBookmarksWidget() {
backbone, SLOT(removeAllBookmark()));
connect(bookmarksWidget, SIGNAL(showAllBookmarks()),
- menu, SLOT(hide()));
-
- connect(menu, SIGNAL(aboutToHide()),
this, SLOT(showAllBookmarks()));
}
}
void MenuWidget::hideMenu() {
- tabWidget->hide();
+ tabWidget->parentWidget()->hide();
}
historySizeSpinBox);
searchResultSizeSpinBox->setMinimum(1);
- historySizeSpinBox->setMaximum(1);
+ historySizeSpinBox->setMinimum(1);
#ifdef Q_WS_MAEMO_5
verticalLayout->addSpacing(20);
--- /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 "WelcomeScreenWidget.h"
+
+WelcomeScreenWidget::WelcomeScreenWidget(QWidget *parent) :
+ QScrollArea(parent)
+{
+ QString infoNote, licenseNote, comarchNote;
+ infoNote = "<center><h2>Welcome in mDictionary!</h2></center>";
+
+
+ mainLayout = new QVBoxLayout(this);
+ setLayout(mainLayout);
+
+ imageLabel = new QLabel(this);
+ mainLabel = new QLabel(infoNote, this);
+
+ mainLayout->addWidget(imageLabel, 0, Qt::AlignCenter);
+ mainLayout->addWidget(mainLabel, 0, Qt::AlignCenter);
+
+ QImage img(":/icons/mdictionary.png");
+ imageLabel->setPixmap(QPixmap::fromImage(img));
+ imageLabel->resize(imageLabel->pixmap()->size());
+
+
+ //mainLabel->setWordWrap(true);
+
+ #ifdef Q_WS_MAEMO_5
+ mainLayout->addSpacing(20);
+ #endif
+}
--- /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 WELCOMESCREENWIDGET_H
+#define WELCOMESCREENWIDGET_H
+
+#include <QWidget>
+#include <QScrollArea>
+#include <QtGui>
+
+class WelcomeScreenWidget : public QScrollArea
+{
+ Q_OBJECT
+public:
+ explicit WelcomeScreenWidget(QWidget *parent = 0);
+
+private:
+ QVBoxLayout* mainLayout;
+ QLabel* mainLabel, * licenseLabel, *imageLabel;
+};
+
+#endif // WELCOMESCREENWIDGET_H
QModelIndex item = selectedIndexes().at(0);
if(!item.isValid()) return;
+ repaint();
+
if(state == Qt::Checked) {
emit addBookmark(searchResult[item.data().toString()]);
}