/[svn]/qsampler/trunk/src/qsamplerInstrumentList.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerInstrumentList.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1461 by schoenebeck, Sun Oct 28 23:30:36 2007 UTC revision 1464 by capela, Thu Nov 1 17:14:21 2007 UTC
# Line 2  Line 2 
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5       Copyright (C) 2007, Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 65  qsamplerInstrumentGroup::qsamplerInstrum Line 66  qsamplerInstrumentGroup::qsamplerInstrum
66  {  {
67          QListViewItem::setRenameEnabled(0, true);          QListViewItem::setRenameEnabled(0, true);
68    
69          QListViewItem::setPixmap(0, QPixmap::fromMimeSource("itemGroup.png"));          QListViewItem::setPixmap(0, QPixmap(":/icons/itemGroup.png"));
70          QListViewItem::setText(0, sName);          QListViewItem::setText(0, sName);
71  }  }
72    
# Line 76  qsamplerInstrumentGroup::qsamplerInstrum Line 77  qsamplerInstrumentGroup::qsamplerInstrum
77  {  {
78          QListViewItem::setRenameEnabled(0, true);          QListViewItem::setRenameEnabled(0, true);
79    
80          QListViewItem::setPixmap(0, QPixmap::fromMimeSource("itemGroup.png"));          QListViewItem::setPixmap(0, QPixmap(":/icons/itemGroup.png"));
81  }  }
82    
83    
# Line 119  void qsamplerInstrumentGroup::setOpen ( Line 120  void qsamplerInstrumentGroup::setOpen (
120  {  {
121          // Set the proper pixmap of this...          // Set the proper pixmap of this...
122          if (rtti() == qsamplerInstrumentList::Group) {          if (rtti() == qsamplerInstrumentList::Group) {
123                  QListViewItem::setPixmap(0, QPixmap::fromMimeSource(                  QListViewItem::setPixmap(0, QPixmap(bOpen ?
124                          bOpen ? "itemGroupOpen.png" : "itemGroup.png"));                          ":/icons/itemGroupOpen.png" : ":/icons/itemGroup.png"));
125          }          }
126          // Open it up...          // Open it up...
127          QListViewItem::setOpen(bOpen);          QListViewItem::setOpen(bOpen);
# Line 190  qsamplerInstrument *qsamplerInstrumentIt Line 191  qsamplerInstrument *qsamplerInstrumentIt
191  // Item refreshment.  // Item refreshment.
192  void qsamplerInstrumentItem::update (void)  void qsamplerInstrumentItem::update (void)
193  {  {
194          QListViewItem::setPixmap(0, QPixmap::fromMimeSource("itemFile.png"));          QListViewItem::setPixmap(0, QPixmap(":/icons/itemFile.png"));
195    
196          const QString s = "-";          const QString s = "-";
197          if (m_pInstrument) {          if (m_pInstrument) {
# Line 263  qsamplerInstrumentList::qsamplerInstrume Line 264  qsamplerInstrumentList::qsamplerInstrume
264          QListView::setColumnWidth(5, 240);      // File          QListView::setColumnWidth(5, 240);      // File
265    
266          m_pNewGroupAction = new QAction(          m_pNewGroupAction = new QAction(
267                  QIconSet(QPixmap::fromMimeSource("itemGroupNew.png")),                  QIcon(":/icons/itemGroupNew.png"),
268                  tr("New &Group"), tr("Ctrl+G"), this);                  tr("New &Group"), tr("Ctrl+G"), this);
269          m_pNewItemAction  = new QAction(          m_pNewItemAction  = new QAction(
270                  QIconSet(QPixmap::fromMimeSource("itemNew.png")),                  QIcon(":/icons/itemNew.png"),
271                  tr("New &Instrument..."), tr("Ins"), this);                  tr("New &Instrument..."), tr("Ins"), this);
272          m_pEditItemAction = new QAction(          m_pEditItemAction = new QAction(
273                  QIconSet(QPixmap::fromMimeSource("formEdit.png")),                  QIcon(":/icons/formEdit.png"),
274                  tr("&Edit..."), tr("Enter"), this);                  tr("&Edit..."), tr("Enter"), this);
275          m_pRenameAction   = new QAction(tr("&Rename"), tr("F2"), this);          m_pRenameAction   = new QAction(tr("&Rename"), tr("F2"), this);
276          m_pDeleteAction   = new QAction(          m_pDeleteAction   = new QAction(
277                  QIconSet(QPixmap::fromMimeSource("formRemove.png")),                  QIcon(":/icons/formRemove.png"),
278                  tr("&Delete"), tr("Del"), this);                  tr("&Delete"), tr("Del"), this);
279          m_pRefreshAction  = new QAction(          m_pRefreshAction  = new QAction(
280                  QIconSet(QPixmap::fromMimeSource("formRefresh.png")),                  QIcon(":/icons/formRefresh.png"),
281                  tr("Re&fresh"), tr("F5"), this);                  tr("Re&fresh"), tr("F5"), this);
282    
283          m_pNewGroupAction->setToolTip(tr("New Group"));          m_pNewGroupAction->setToolTip(tr("New Group"));
# Line 879  void MidiInstrumentsDelegate::updateEdit Line 880  void MidiInstrumentsDelegate::updateEdit
880      if (editor) editor->setGeometry(option.rect);      if (editor) editor->setGeometry(option.rect);
881  }  }
882    
 // end of qsamplerInstrumentList.cpp  
883    
884    // end of qsamplerInstrumentList.cpp

Legend:
Removed from v.1461  
changed lines
  Added in v.1464

  ViewVC Help
Powered by ViewVC