Songbook-Client  0.7
This application is a manager of customguitar songbooks
 All Classes Files Functions Variables Enumerations Enumerator Pages
search-widget.hh
Go to the documentation of this file.
1 // Copyright (C) 2009-2012, Romain Goffe <romain.goffe@gmail.com>
2 // Copyright (C) 2009-2012, Alexandre Dupas <alexandre.dupas@gmail.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License as
6 // published by the Free Software Foundation; either version 2 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but
10 // WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 // 02110-1301, USA.
18 //******************************************************************************
19 
20 #ifndef __SEARCH_WIDGET_HH
21 #define __SEARCH_WIDGET_HH
22 
23 #include <QFrame>
24 
25 class QPlainTextEdit;
26 class QSettings;
27 class QLineEdit;
28 class QPushButton;
29 
38 class CSearchWidget : public QFrame
39 {
40  Q_OBJECT
41  public:
43  CSearchWidget(QWidget *parent = 0);
44 
46  virtual ~CSearchWidget();
47 
52  void setTextEditor(QPlainTextEdit *editor);
53 
58  void writeSettings();
59 
64  void readSettings();
65 
69  void setFocus();
70 
76  void keyPressEvent(QKeyEvent *event);
77 
78 public slots:
82  void find();
83 
84 private:
85  QPlainTextEdit *m_editor;
86 
87  QLineEdit *m_findLineEdit;
88  QPushButton *m_findPrevButton;
89  QPushButton *m_findNextButton;
90 };
91 
92 #endif // __SEARCH_WIDGET_HH