kalarm

emailidcombo.h
1 /*
2  * emailidcombo.h - email identity combo box with read-only option
3  * Program: kalarm
4  * Copyright © 2004,2006 by David Jarvie <software@astrojar.org.uk>
5  *
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.
10  *
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.
15  *
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.
19  */
20 
21 #ifndef EMAILIDCOMBO_H
22 #define EMAILIDCOMBO_H
23 
24 #include <libkpimidentities/identitycombo.h>
25 #include "combobox.h"
26 
27 
28 class EmailIdCombo : public KPIM::IdentityCombo
29 {
30  TQ_OBJECT
31 
32  public:
33  explicit EmailIdCombo(KPIM::IdentityManager*, TQWidget* parent = 0, const char* name = 0);
34  void setReadOnly(bool ro) { mReadOnly = ro; }
35  protected:
36  virtual void mousePressEvent(TQMouseEvent*);
37  virtual void mouseReleaseEvent(TQMouseEvent*);
38  virtual void mouseMoveEvent(TQMouseEvent*);
39  virtual void keyPressEvent(TQKeyEvent*);
40  virtual void keyReleaseEvent(TQKeyEvent*);
41  private:
42  bool mReadOnly; // value cannot be changed
43 };
44 
45 #endif // EMAILIDCOMBO_H