CDlgEditMapLevel::CDlgEditMapLevel(QTreeWidgetItem * item, const QString& path, QWidget * parent) : QDialog(parent) , item(item) , mapPath(path) { setupUi(this); spinZoom->setValue(item->data(0,CCreateMapQMAP::eZoom).toInt()); listFiles->addItems(item->text(CCreateMapQMAP::eFiles).split("; ",QString::SkipEmptyParts)); toolFiles->setIcon(QPixmap(":/icons/iconFileLoad16x16.png")); connect(toolFiles, SIGNAL(clicked()), this, SLOT(slotSelectFiles())); toolAdd->setIcon(QPixmap(":/icons/iconFileAdd16x16.png")); connect(toolAdd, SIGNAL(clicked()), this, SLOT(slotAdd())); toolDel->setIcon(QPixmap(":/icons/iconFileDel16x16.png")); connect(toolDel, SIGNAL(clicked()), this, SLOT(slotDel())); toolUp->setIcon(QPixmap(":/icons/iconUpload16x16.png")); connect(toolUp, SIGNAL(clicked()), this, SLOT(slotUp())); toolDown->setIcon(QPixmap(":/icons/iconDownload16x16.png")); connect(toolDown, SIGNAL(clicked()), this, SLOT(slotDown())); connect(listFiles, SIGNAL(itemSelectionChanged()), this, SLOT(slotListChanged())); }
forwardingPage::forwardingPage(QString text, QString newText, QWidget* parent) : QFrame(parent) { m_newForwardDialog = new newForwardDialog(newText, this); connect(m_newForwardDialog, SIGNAL(okClicked()), this, SLOT(slotAdd())); QGridLayout *layout = new QGridLayout(this, 4, 2); layout->setSpacing(KDialogBase::spacingHint()); QLabel *label = new QLabel(text, this); label->show(); layout->addMultiCellWidget(label, 0, 0, 0, 1); m_forwards = new KListView(this); m_forwards->addColumn(i18n("In/Out")); m_forwards->addColumn(i18n("Port")); m_forwards->addColumn(i18n("Destination")); m_forwards->show(); layout->addMultiCellWidget(m_forwards, 1, 3, 0, 0); connect(m_forwards, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); m_add = new KPushButton(i18n("Add Port"), this); m_add->show(); layout->addWidget(m_add, 1, 1); connect(m_add, SIGNAL(clicked()), m_newForwardDialog, SLOT(show())); m_del = new KPushButton(i18n("Remove Port"), this); m_del->show(); m_del->setEnabled(false); layout->addWidget(m_del, 2, 1); connect(m_del, SIGNAL(clicked()), this, SLOT(slotDel())); layout->setColStretch(0, 1); }
void TrWidget::slotCut() { slotCopy(); slotDel(); }