source: SMSSender/frontend/gui/ui/components/searchbutton.h @ 319:1ec456878bcb

separation-frontend-backend
Last change on this file since 319:1ec456878bcb was 319:1ec456878bcb, checked in by Sämy Zehnder <saemy.zehnder@…>, 8 years ago
  • Adjusts header guards to follow common pattern based on the filename.
File size: 1.4 KB
Line 
1/*
2 * Copyright 2009 Benjamin C. Meyer <ben@meyerhome.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU 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,
17 * Boston, MA  02110-1301  USA
18 */
19#ifndef FRONTEND_GUI_UI_COMPONENTS_SEARCHBUTTON_H
20#define FRONTEND_GUI_UI_COMPONENTS_SEARCHBUTTON_H
21
22#include <qabstractbutton.h>
23
24namespace UI {
25
26class QCompleter;
27class SearchButton : public QAbstractButton
28{
29    Q_OBJECT
30
31public:
32    SearchButton(QWidget *parent = 0);
33    void setImage(const QImage &image);
34    void setShowMenuTriangle(bool show);
35    bool showMenuTriangle() const;
36    void paintEvent(QPaintEvent *event);
37    QSize sizeHint() const;
38
39private:
40    QImage generateSearchImage(bool dropDown);
41    QImage m_cache;
42    bool m_showMenuTriangle;
43};
44
45} // namespace UI
46
47#endif // FRONTEND_GUI_UI_COMPONENTS_SEARCHBUTTON_H
48
Note: See TracBrowser for help on using the repository browser.