/* ///////////////////////////////////////////////////////////////////////////// * Construct a new TTAudioFileList widget. */ TTAudioTreeView::TTAudioTreeView(QWidget* parent) :QWidget(parent) { setupUi( this ); mpAVItem = 0; audioListView->setRootIsDecorated(false); QHeaderView* header = audioListView->header(); header->resizeSection(0, 220); header->resizeSection(1, 220); header->resizeSection(2, 140); header->resizeSection(3, 100); header->resizeSection(4, 100); header->resizeSection(5, 100); header->resizeSection(6, 60); createActions(); // signal and slot connections connect(pbAudioFileOpen, SIGNAL(clicked()), SIGNAL(openFile())); connect(pbAudioEntryUp, SIGNAL(clicked()), SLOT(onItemUp())); connect(pbAudioEntryDown, SIGNAL(clicked()), SLOT(onItemDown())); connect(pbAudioEntryDelete, SIGNAL(clicked()), SLOT(onRemoveItem())); connect(audioListView, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT( onContextMenuRequest(const QPoint&))); }
StringListEditor::StringListEditor(const QString& title, QWidget* parent) : QGroupBox(title, parent) { // create layout _hLayout = new QVBoxLayout( this ); _hLayout->setMargin(5); _hLayout->setSpacing(3); // create toolbar QToolBar* tb = new QToolBar; tb->layout()->setMargin(0); tb->layout()->setSpacing(0); tb->setIconSize(QSize(16, 16)); _hLayout->addWidget(tb); // create listwidget _list = new QListWidget; _list->setMinimumHeight(40); _list->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); _hLayout->addWidget(_list); // create actions QAction* addAction = new QAction( QIcon( ":/listeditor/add.png" ), tr("Add Item"), tb); QAction* removeAction = new QAction( QIcon( ":/listeditor/remove.png" ), tr("Remove Item"), tb); QAction* clearAction = new QAction( QIcon( ":/listeditor/clear.png" ), tr("Clear Items"), tb); QAction* upAction = new QAction( QIcon( ":/listeditor/up.png" ), tr("Move Item Up"), tb); QAction* downAction = new QAction( QIcon( ":/listeditor/down.png" ), tr("Move Item Down"), tb); QAction* editAction = new QAction( QIcon( ":/listeditor/edit.png" ), tr("Edit Item"), tb); // add actions to toolbar tb->addAction(addAction); tb->addAction(removeAction); tb->addAction(clearAction); tb->addAction(upAction); tb->addAction(downAction); tb->addAction(editAction); // connections connect(addAction, SIGNAL(triggered()), this, SLOT(onAddItem())); connect(removeAction, SIGNAL(triggered()), this, SLOT(onRemoveItem())); connect(clearAction, SIGNAL(triggered()), this, SLOT(onClearItem())); connect(upAction, SIGNAL(triggered()), this, SLOT(onMoveUpItem())); connect(downAction, SIGNAL(triggered()), this, SLOT(onMoveDownItem())); connect(editAction, SIGNAL(triggered()), this, SLOT(onEditItem())); connect(_list, SIGNAL(itemChanged(QListWidgetItem*)), this, SIGNAL(edited())); connect( this, SIGNAL(edited()), this, SLOT(onEdited())); }
//----------------------------------------------------------------------------- // Function: FileDependencyGraphWidget::FileDependencyGraphWidget() //----------------------------------------------------------------------------- PortMapsTreeView::PortMapsTreeView(QWidget* parent) : QTreeView(parent), model_(0), contextMenuIndex_(QModelIndex()), removeAction_(new QAction("Remove mapping", this)), restoreAction_(new QAction("Restore logical port to list", this)) { // cells are resized to match contents header()->setSectionResizeMode(QHeaderView::Interactive); //last column is stretched take the available space in the widget header()->setStretchLastSection(true); setUniformRowHeights(true); setIndentation(15); removeAction_->setShortcut(Qt::Key_Delete); connect(removeAction_, SIGNAL(triggered()), this, SLOT(onRemoveItem()), Qt::UniqueConnection); connect(restoreAction_, SIGNAL(triggered()), this, SLOT(onRestoreItem()), Qt::UniqueConnection); }
void EnchantingDialog::open() { center(); onRemoveItem(NULL); onRemoveSoul(NULL); }
void SubTabController::doRemove() { onRemoveItem(m_subTabView->itemSelector()->selectedItem()); }
void SubTabController::removeItem(OSItem* item) { onRemoveItem(item); }