OnyxSearchDialog::OnyxSearchDialog(QWidget *parent, OnyxSearchContext & ctx) : OnyxDialog(parent) , big_layout_(&content_widget_) , line_edit_layout_(0) , line_edit_(0, this) , sub_menu_(0, this) , keyboard_(this) , next_prev_(0, this) , ctx_(ctx) , mode_(MODE_FULL) { createLayout(); connectWithChildren(); }
OnyxDictFrame::OnyxDictFrame(QWidget *parent, DictionaryManager & dict, tts::TTS *tts, bool exit_by_menu) : OnyxDialog(parent) , big_layout_(&content_widget_) , line_edit_layout_(0) , dict_menu_layout_(0) , line_edit_(0, this) , explanation_(0) , list_widget_(0, 0) , help_widget_(tr("No dictionary found. Please put dictionaries in SD Card or internal flash's \"dicts\" folder."), this) , dictionary_menu_(0, this) , tts_button_view_(0, this) , keyboard_(this) , status_bar_(this, MENU | MESSAGE | BATTERY | CLOCK | SCREEN_REFRESH | INPUT_TEXT) , dict_mgr_(dict) , tts_engine_(tts) , internal_state_(-1) , similar_words_checked_(false) , exit_by_menu_(exit_by_menu) { #ifndef Q_WS_QWS resize(600, 800); #else resize(qApp->desktop()->screenGeometry().size()); #endif createLayout(); initBrowser(); initDictionaries(); connectWithChildren(); connect(&status_bar_, SIGNAL(menuClicked()), this, SLOT(popupMenu())); connect(&status_bar_, SIGNAL(requestInputText()), this, SLOT(onHideKeyboard())); #ifdef Q_WS_QWS connect(qApp->desktop(), SIGNAL(resized(int)), this, SLOT(onScreenSizeChanged(int)), Qt::QueuedConnection); #endif // connect the signals with sys_state_ SysStatus & sys_status = SysStatus::instance(); connect(&sys_status, SIGNAL(volumeChanged(int, bool)), this, SLOT(onSystemVolumeChanged(int, bool))); connect(&explanation_, SIGNAL(highlighted(QString)), this, SLOT(lookup(QString))); explanation_.installEventFilter(this); list_widget_.installEventFilter(this); }