Move unittestenv to correct location
[kdepim.git] / kalarm / emailidcombo.h
blob99940d3eae66b50d30659cf92e002408104014f5
1 /*
2 * emailidcombo.h - email identity combo box with read-only option
3 * Program: kalarm
4 * Copyright © 2004,2006 by David Jarvie <djarvie@kde.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef EMAILIDCOMBO_H
22 #define EMAILIDCOMBO_H
24 #include "combobox.h"
25 #include <KIdentityManagement/kidentitymanagement/identitycombo.h>
27 class QMouseEvent;
28 class QKeyEvent;
31 class EmailIdCombo : public KIdentityManagement::IdentityCombo
33 Q_OBJECT
34 public:
35 explicit EmailIdCombo(KIdentityManagement::IdentityManager*, QWidget* parent = Q_NULLPTR);
36 void setReadOnly(bool ro) { mReadOnly = ro; }
38 protected:
39 void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE;
40 void mouseReleaseEvent(QMouseEvent*) Q_DECL_OVERRIDE;
41 void mouseMoveEvent(QMouseEvent*) Q_DECL_OVERRIDE;
42 void keyPressEvent(QKeyEvent*) Q_DECL_OVERRIDE;
43 void keyReleaseEvent(QKeyEvent*) Q_DECL_OVERRIDE;
45 private:
46 bool mReadOnly; // value cannot be changed
49 #endif // EMAILIDCOMBO_H
51 // vim: et sw=4: