#include <QtGui>
#include "../backbone/backbone.h"
#include "TranslationWidgetAutoResizer.h"
+#include "TranslationTextEdit.h"
+#include <QPropertyAnimation>
//! Displays translation of word found in dictionaries
/*!
Q_SIGNALS:
void updateSize();
+ void search(QString);
+
public Q_SLOTS:
//! Show widget.
void show();
//! Request to show translation of word list passed as parameter.
void show(QStringList);
+protected:
+ #ifdef Q_WS_MAEMO_5
+ void keyPressEvent(QKeyEvent *);
+ #endif
+
+private Q_SLOTS:
+ void searchSelected();
+ #ifdef Q_WS_MAEMO_5
+ void showButtons(bool);
+ #endif
private:
- QTextEdit *textEdit;
- QToolButton* zoomInToolButton;
- QToolButton* zoomOutToolButton;
+ TranslationTextEdit *textEdit;
#ifdef Q_WS_MAEMO_5
- QToolButton* fullScreenButton;
- QToolButton* backButton;
+ QToolButton* zoomInButton;
+ QToolButton* zoomOutButton;
+ QToolButton* selectAllButton;
+ QToolButton* copyButton;
+ QToolButton* searchButton;
+ QToolButton* showButtonsButton;
+
+ QPropertyAnimation* zoomInButtonAnimation;
+ QPropertyAnimation* zoomOutButtonAnimation;
+ QPropertyAnimation* copyButtonAnimation;
+ QPropertyAnimation* selectAllButtonAnimation;
+ QPropertyAnimation* searchButtonAnimation;
+ QAnimationGroup* buttonsAnimation;
+
+ void initButtons();
+ bool buttonsInitialized;
+ bool buttonsVisible;
+
+ void grabZoomKeys(bool);
#endif
QVBoxLayout *verticalLayout;
QHBoxLayout* horizontalLayout;
TranslationWidgetAutoResizer* resizer;
void initializeUI();
-
};
#endif // TRANSLATIONWIDGET_H