~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to muse/widgets/lcombo.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2011-08-12 11:16:41 UTC
  • mto: (1.1.9) (10.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20110812111641-72iatqb9jomjejko
ImportĀ upstreamĀ versionĀ 2.0~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//=========================================================
2
2
//  MusE
3
3
//  Linux Music Editor
4
 
//    $Id: lcombo.h,v 1.1.1.1 2003/10/27 18:54:29 wschweer Exp $
 
4
//    $Id: lcombo.h,v 1.1.1.1.2.3 2009/07/01 22:14:56 spamatica Exp $
5
5
//  (C) Copyright 2000 Werner Schweer (ws@seh.de)
6
6
//=========================================================
7
7
 
8
8
#ifndef __LCOMBO_H__
9
9
#define __LCOMBO_H__
10
10
 
11
 
#include <qwidget.h>
12
 
#include <qcombobox.h>
 
11
#include <QAbstractItemView>
 
12
#include <QComboBox>
 
13
#include <QVariant>
13
14
 
14
15
class QString;
15
 
class QListBox;
 
16
 
16
17
 
17
18
//---------------------------------------------------------
18
19
//   LabelCombo
25
26
   signals:
26
27
      void activated(int);
27
28
 
 
29
   public slots:
 
30
      void clearFocus() { box->clearFocus(); }
 
31
      void setCurrentIndex(int i);
 
32
 
28
33
   public:
29
34
      LabelCombo(const QString& label, QWidget* parent,
30
35
         const char* name=0);
31
 
      void insertItem(const QString& txt, int index=-1);
32
 
      void setCurrentItem(int i) { box->setCurrentItem(i); }
33
 
      void setListBox(QListBox* lb) { box->setListBox(lb); }
 
36
      void addItem(const QString& txt, const QVariant & userData = QVariant()) { box->addItem(txt, userData); }
 
37
      void insertItem(int index, const QString& txt, const QVariant & userData = QVariant()) { box->insertItem(index, txt, userData); }
 
38
      //void setListBox(Q3ListBox* lb) { box->setListBox(lb); } // ddskrjo
 
39
      void setView(QAbstractItemView* v) { box->setModel(v->model()); box->setView(v); } // p4.0.3
 
40
      void setFocusPolicy ( Qt::FocusPolicy fp ) { box->setFocusPolicy(fp); }
34
41
      };
35
42
 
36
43
#endif