dbl click in spell win to add to ssearch

This commit is contained in:
dockes 2006-10-15 13:07:45 +00:00
parent 64b74d99d5
commit cca7060385
3 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.2 2006-10-11 14:16:26 dockes Exp $ (C) 2005 J.F.Dockes"; static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.3 2006-10-15 13:07:45 dockes Exp $ (C) 2005 J.F.Dockes";
#endif #endif
/* /*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -394,6 +394,8 @@ void RclMain::showSpellDialog()
spellform = new SpellW(0, tr("Spell expansion"), spellform = new SpellW(0, tr("Spell expansion"),
WStyle_Customize | WStyle_NormalBorder | WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu); WStyle_Title | WStyle_SysMenu);
connect(spellform, SIGNAL(wordSelect(QString)),
this, SLOT(ssearchAddTerm(QString)));
spellform->show(); spellform->show();
} else { } else {
// Close and reopen, in hope that makes us visible... // Close and reopen, in hope that makes us visible...

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: spell_w.cpp,v 1.1 2006-10-11 14:16:26 dockes Exp $ (C) 2005 J.F.Dockes"; static char rcsid[] = "@(#$Id: spell_w.cpp,v 1.2 2006-10-15 13:07:45 dockes Exp $ (C) 2005 J.F.Dockes";
#endif #endif
/* /*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -48,6 +48,8 @@ void SpellW::init()
connect(expandPB, SIGNAL(clicked()), this, SLOT(doExpand())); connect(expandPB, SIGNAL(clicked()), this, SLOT(doExpand()));
connect(clearPB, SIGNAL(clicked()), baseWordLE, SLOT(clear())); connect(clearPB, SIGNAL(clicked()), baseWordLE, SLOT(clear()));
connect(dismissPB, SIGNAL(clicked()), this, SLOT(close())); connect(dismissPB, SIGNAL(clicked()), this, SLOT(close()));
connect(suggsTE, SIGNAL(doubleClicked(int, int)),
this, SLOT(textDoubleClicked(int, int)));
} }
void SpellW::doExpand() void SpellW::doExpand()
@ -92,3 +94,9 @@ void SpellW::wordChanged(const QString &text)
clearPB->setEnabled(true); clearPB->setEnabled(true);
} }
} }
void SpellW::textDoubleClicked(int, int)
{
if (suggsTE->hasSelectedText())
emit(wordSelect(suggsTE->selectedText()));
}

View File

@ -1,6 +1,6 @@
#ifndef _ASPELL_W_H_INCLUDED_ #ifndef _ASPELL_W_H_INCLUDED_
#define _ASPELL_W_H_INCLUDED_ #define _ASPELL_W_H_INCLUDED_
/* @(#$Id: spell_w.h,v 1.1 2006-10-11 14:16:26 dockes Exp $ (C) 2006 J.F.Dockes */ /* @(#$Id: spell_w.h,v 1.2 2006-10-15 13:07:45 dockes Exp $ (C) 2006 J.F.Dockes */
/* /*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -36,10 +36,10 @@ public:
public slots: public slots:
virtual void doExpand(); virtual void doExpand();
virtual void wordChanged(const QString&); virtual void wordChanged(const QString&);
// virtual void textDoubleClicked(int, int); virtual void textDoubleClicked(int, int);
signals: signals:
// void wordSelect(QString); void wordSelect(QString);
private: private:
void init(); void init();