krita/ui

kis_cmb_idlist.h

Go to the documentation of this file.
00001 /*
00002  *  kis_cmb_imagetype.h - part of KImageShop/Krayon/Krita
00003  *
00004  *  Copyright (c) 2005 Boudewijn Rempt (boud@valdyas.org)
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef KIS_CMB_IDLIST_H_
00022 #define KIS_CMB_IDLIST_H_
00023 
00024 #include "kcombobox.h"
00025 
00026 #include "KoID.h"
00027 #include <krita_export.h>
00028 
00034 class KRITAUI_EXPORT KisCmbIDList : public KComboBox
00035 {
00036     Q_OBJECT
00037 
00038 public:
00039 
00040     KisCmbIDList(QWidget * parent = 0, const char * name = 0);
00041     virtual ~KisCmbIDList();
00042 
00043 
00044 public:
00045     void setIDList(const QList<KoID> & list);
00046     void setCurrent(const KoID id);
00047     void setCurrent(const QString & s);
00048 
00049     KoID currentItem() const;
00050 
00051 signals:
00052 
00053     void activated(const KoID &);
00054     void highlighted(const KoID &);
00055 
00056 private slots:
00057 
00058     void slotIDActivated(int i);
00059     void slotIDHighlighted(int i);
00060 
00061 private:
00062     // Prevent the deprecated Qt3 method being called. Use setCurrent instead.
00063     void setCurrentText(const QString & s);
00064 
00065     QList<KoID> m_list;
00066 
00067 };
00068 #endif