2013-01-25 15:42:44 +00:00
|
|
|
/* This file is (c) 2013 Tvangeste <i.4m.l33t@yandex.ru>
|
|
|
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
|
|
|
|
|
|
|
#ifndef WORDLIST_HH
|
|
|
|
#define WORDLIST_HH
|
|
|
|
|
|
|
|
#include <QListWidget>
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
|
|
|
#include "wordfinder.hh"
|
2013-07-06 15:31:31 +00:00
|
|
|
#include "delegate.hh"
|
2013-01-25 15:42:44 +00:00
|
|
|
|
|
|
|
class WordList : public QListWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit WordList(QWidget * parent = 0);
|
|
|
|
void attachFinder(WordFinder * finder);
|
2013-01-28 20:31:28 +00:00
|
|
|
virtual void setTranslateLine(QLineEdit * line)
|
|
|
|
{ translateLine = line; }
|
2013-01-25 15:42:44 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void statusBarMessage(QString const & message, int timeout = 0, QPixmap const & pixmap = QPixmap());
|
2013-01-27 22:12:00 +00:00
|
|
|
void contentChanged();
|
2013-01-25 15:42:44 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void prefixMatchUpdated();
|
|
|
|
void prefixMatchFinished();
|
|
|
|
void updateMatchResults( bool finished );
|
|
|
|
|
|
|
|
private:
|
|
|
|
void refreshTranslateLine();
|
2013-01-27 22:12:00 +00:00
|
|
|
|
2013-01-25 15:42:44 +00:00
|
|
|
WordFinder * wordFinder;
|
|
|
|
QLineEdit * translateLine;
|
2013-07-06 15:31:31 +00:00
|
|
|
WordListItemDelegate listItemDelegate;
|
2013-01-25 15:42:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // WORDLIST_HH
|