diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-03-07 19:01:11 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-03-07 19:01:11 +0000 |
commit | e40fc849149dd97c248866a4a1d026dda5e57b62 (patch) | |
tree | b12b358f3b3a0608001d30403358f8443118ec5f /attic/muse2-oom/muse2/muse/widgets/combobox.h | |
parent | 1bd4f2e8d9745cabb667b043171cad22c8577768 (diff) |
clean3
Diffstat (limited to 'attic/muse2-oom/muse2/muse/widgets/combobox.h')
-rw-r--r-- | attic/muse2-oom/muse2/muse/widgets/combobox.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/attic/muse2-oom/muse2/muse/widgets/combobox.h b/attic/muse2-oom/muse2/muse/widgets/combobox.h new file mode 100644 index 00000000..305ad0b3 --- /dev/null +++ b/attic/muse2-oom/muse2/muse/widgets/combobox.h @@ -0,0 +1,46 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: combobox.h,v 1.3 2004/02/29 12:12:36 wschweer Exp $ +// (C) Copyright 2004 Werner Schweer (ws@seh.de) +//========================================================= + +#ifndef __COMBOBOX_H__ +#define __COMBOBOX_H__ + +#include <QLabel> + +class QMenu; + +//--------------------------------------------------------- +// ComboBox +//--------------------------------------------------------- + +class ComboBox : public QLabel { + Q_OBJECT + Q_PROPERTY( int id READ id WRITE setId ) + + int _id; + int _currentItem; + QMenu* list; + virtual void mousePressEvent(QMouseEvent*); + + private slots: + void activatedIntern(QAction*); + + signals: + void activated(int val, int id); + + public: + ComboBox(QWidget* parent, const char* name = 0); + ~ComboBox(); + void setCurrentItem(int); + void insertItem(const QString& s, int id = -1); + int id() const { return _id; } + void setId(int i) { _id = i; } + }; + +#endif + + + |