[Qt-creator] Highlight and filter application output

eike.ziller at nokia.com eike.ziller at nokia.com
Fri Mar 9 09:42:41 CET 2012


On 8 Mar 2012, at 08:29, ext Orgad and Raizel Shaneh wrote:

> On Wed, Mar 7, 2012 at 11:52 PM, Markus Hossner <markushossner at gmx.de> wrote:
>> Am 03.03.12 22:01, schrieb Orgad and Raizel Shaneh:
>> > IMHO, the Mark feature is better integrated in existing Find (like is
>> > done in the main editor).
>> 
>> You mean using the editor search dialog for searching within the
>> Application Output pane too?
>>  
> Click inside a pane then press Ctrl+F. That searches in that pane. The mark feature can be integrated with this find (like search in the main editor that highlights all occurences).

The basic approach of implementing that would be:
* Implement a public slot "highlightAll(const QString &txt, Find::FindFlags findFlags)" in Core::OutputWindow that highlights all occurrances (you seem to already have some code for that)
* In e.g. ProjectExplorer::Internal::AppOutputPane::createNewOutputWindow, instead of 

(line 338ff)
     Aggregation::Aggregate *agg = new Aggregation::Aggregate;
    agg->add(ow);
    agg->add(new Find::BaseTextFind(ow));

do

     Find::BaseTextFind *textFind = new Find::BaseTextFind(ow);
     Aggregation::Aggregate *agg = new Aggregation::Aggregate;
    agg->add(ow);
    agg->add(textFind);
    connect(textFind, SIGNAL(highlightAll(QString,Find::FindFlags)), ow, SLOT(highlightAll(QString,Find::FindFlags)));

* enjoy ;)


-- 
Eike Ziller
Principal Software Engineer

Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori




More information about the Qt-creator mailing list