MatrixDisplayDlg::MatrixDisplayDlg(QWidget* parent/*=0*/) : QWidget(parent) , Ui::MatrixDisplayDlg() { setupUi(this); connect(exportToAsciiPushButton, SIGNAL(clicked()), this, SLOT(exportToASCII())); connect(exportToClipboardPushButton, SIGNAL(clicked()), this, SLOT(exportToClipboard())); show(); }
ExporterPluginView::ExporterPluginView(KTextEditor::View* view) : QObject(view), KXMLGUIClient(view), m_view(view) { setComponentData( ExporterPluginFactory::componentData() ); setXMLFile("ktexteditor_exporterui.rc"); m_copyAction = actionCollection()->addAction("edit_copy_html", this, SLOT(exportToClipboard())); m_copyAction->setIcon(KIcon("edit-copy")); m_copyAction->setText(i18n("Copy as &HTML")); m_copyAction->setWhatsThis(i18n("Use this command to copy the currently selected text as HTML to the system clipboard.")); m_copyAction->setEnabled(m_view->selection()); m_fileExportAction = actionCollection()->addAction("file_export_html", this, SLOT(exportToFile())); m_fileExportAction->setText(i18n("E&xport as HTML...")); m_fileExportAction->setWhatsThis(i18n("This command allows you to export the current document" " with all highlighting information into a HTML document.")); connect(m_view, SIGNAL(selectionChanged(KTextEditor::View*)), this, SLOT(updateSelectionAction(KTextEditor::View*))); }
ccVolumeCalcTool::ccVolumeCalcTool(ccGenericPointCloud* cloud1, ccGenericPointCloud* cloud2, QWidget* parent/*=0*/) : QDialog(parent, Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint) , cc2Point5DimEditor() , Ui::VolumeCalcDialog() , m_cloud1(cloud1) , m_cloud2(cloud2) { setupUi(this); connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveSettingsAndAccept())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(gridStepDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateGridInfo())); connect(gridStepDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(gridOptionChanged())); connect(groundEmptyValueDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(gridOptionChanged())); connect(ceilEmptyValueDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(gridOptionChanged())); connect(projDimComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(projectionDirChanged(int))); connect(updatePushButton, SIGNAL(clicked()), this, SLOT(updateGridAndDisplay())); connect(heightProjectionComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(gridOptionChanged())); connect(fillGroundEmptyCellsComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(groundFillEmptyCellStrategyChanged(int))); connect(fillCeilEmptyCellsComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(ceilFillEmptyCellStrategyChanged(int))); connect(swapToolButton, SIGNAL(clicked()), this, SLOT(swapRoles())); connect(groundComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(groundSourceChanged(int))); connect(ceilComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(ceilSourceChanged(int))); connect(clipboardPushButton, SIGNAL(clicked()), this, SLOT(exportToClipboard())); connect(exportGridPushButton, SIGNAL(clicked()), this, SLOT(exportGridAsCloud())); connect(precisionSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setDisplayedNumberPrecision(int))); if (m_cloud1 && !m_cloud2) { //the existing cloud is always the second by default std::swap(m_cloud1, m_cloud2); } assert(m_cloud2); //custom bbox editor ccBBox gridBBox = m_cloud1 ? m_cloud1->getOwnBB() : ccBBox(); if (m_cloud2) { gridBBox += m_cloud2->getOwnBB(); } if (gridBBox.isValid()) { createBoundingBoxEditor(gridBBox, this); connect(editGridToolButton, SIGNAL(clicked()), this, SLOT(showGridBoxEditor())); } else { editGridToolButton->setEnabled(false); } groundComboBox->addItem("Constant"); ceilComboBox->addItem("Constant"); if (m_cloud1) { groundComboBox->addItem(m_cloud1->getName()); ceilComboBox->addItem(m_cloud1->getName()); } if (m_cloud2) { groundComboBox->addItem(m_cloud2->getName()); ceilComboBox->addItem(m_cloud2->getName()); } assert(groundComboBox->count() >= 2); groundComboBox->setCurrentIndex(groundComboBox->count()-2); ceilComboBox->setCurrentIndex(ceilComboBox->count()-1); //add window create2DView(mapFrame); if (m_glWindow) { ccGui::ParamStruct params = m_glWindow->getDisplayParameters(); params.colorScaleShowHistogram = false; params.displayedNumPrecision = precisionSpinBox->value(); m_glWindow->setDisplayParameters(params, true); } loadSettings(); updateGridInfo(); gridIsUpToDate(false); }