OpenStructure
completer_base.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_COMPLETER_BASE_HH
20 #define OST_COMPLETER_BASE_HH
21 
22 /*
23  Authors: Marco Biasini, Andreas Schenk
24  */
25 
26 #include <QCompleter>
27 
28 
29 namespace ost { namespace gui {
30 
31 class OstCompleterBase : public QCompleter
32 {
33 Q_OBJECT
34 public:
35  OstCompleterBase(QObject * parent = 0);
37  bool eventFilter(QObject *obj, QEvent *event);
38 
39 signals:
40  void recomplete(const QString& match);
41 public slots:
42  void complete(const QRect & rect = QRect(),bool inline_completion=true);
43 protected:
44  QString GetCommonMatch();
45 };
46 
47 }}//ns
48 
49 #endif // OST_COMPLETER_BASE_HH
void recomplete(const QString &match)
OstCompleterBase(QObject *parent=0)
bool eventFilter(QObject *obj, QEvent *event)
void complete(const QRect &rect=QRect(), bool inline_completion=true)
Definition: base.dox:1