00001 /* -*- c++ -*- (for Emacs) 00002 * 00003 * qwpcombobox.h 00004 * 00005 * Created by Aidan Lane on Wed Jan 04 2006. 00006 * Copyright (c) 2006 Optimisation and Constraint Solving Group, 00007 * Monash University. All rights reserved. 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 */ 00023 00024 #ifndef QWPCOMBOBOX_H 00025 #define QWPCOMBOBOX_H 00026 00027 00028 #include <QComboBox> 00029 00030 00056 class QwpComboBox : public QComboBox { 00057 00058 Q_OBJECT 00059 Q_PROPERTY( QVariant currentKey READ currentKey WRITE setCurrentKey STORED false ) 00060 00061 public: 00062 QwpComboBox( QWidget* parent = 0 ); 00063 00064 QVariant itemKey( int index ) const; 00065 QVariant currentKey() const; 00066 00067 public slots: 00068 void setCurrentKey( const QVariant& key ); 00069 }; 00070 00071 00072 #endif // ! QWPCOMBOBOX_H
1.5.2