void NetworkEditorView::focusInEvent(QFocusEvent* e) { auto enable = networkEditor_->selectedItems().size() > 0; setupAction("Cut", enable, [&]() { auto data = networkEditor_->cut(); auto mimedata = util::make_unique<QMimeData>(); mimedata->setData(QString("application/x.vnd.inviwo.network+xml"), data); mimedata->setData(QString("text/plain"), data); QApplication::clipboard()->setMimeData(mimedata.release()); }); setupAction("Copy", enable, [&]() { auto data = networkEditor_->copy(); auto mimedata = util::make_unique<QMimeData>(); mimedata->setData(QString("application/x.vnd.inviwo.network+xml"), data); mimedata->setData(QString("text/plain"), data); QApplication::clipboard()->setMimeData(mimedata.release()); }); setupAction("Paste", true, [&]() { auto clipboard = QApplication::clipboard(); auto mimeData = clipboard->mimeData(); if (mimeData->formats().contains(QString("application/x.vnd.inviwo.network+xml"))) { networkEditor_->paste(mimeData->data(QString("application/x.vnd.inviwo.network+xml"))); } else if (mimeData->formats().contains(QString("text/plain"))) { networkEditor_->paste(mimeData->data(QString("text/plain"))); } }); setupAction("Delete", enable, [&]() { networkEditor_->deleteSelection(); }); QGraphicsView::focusInEvent(e); }
MainWindow::MainWindow(const QUrl& url) : m_markpad(0) , m_recentFiles(0) , m_firstTextChange(false) { m_markpad = new Markpado(this); setupAction(); setupConnect(); setCentralWidget(m_markpad); setupGUI(QSize(500,600), Default, "markpado.rc"); guiFactory()->addClient(m_markpad->m_editor); setStandardToolBarMenuEnabled(true); // FIXME: make sure the config dir exists, any idea how to do it more cleanly? QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)).mkpath(QStringLiteral(".")); setAutoSaveSettings(); readConfig(); slotOpen(url); show(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); setupGui(); setupAction(); setupModel(); setupConnection(); }
AleatoriedadWidget::AleatoriedadWidget(QWidget *parent) : QWidget(parent), ui(new Ui::AleatoriedadWidget) { ui->setupUi(this); esconder(2); setupAction(); createMenus(); setupToolBar(); }
KMarkNote::KMarkNote(QWidget* parent) : KXmlGuiWindow(parent) , isPreview(false) { KAction* previewAction = actionCollection()->addAction("file_preview", this, SLOT(togglePreview())); previewAction->setIcon(KIcon("document-preview")); previewAction->setText(i18n("Preview")); previewAction->setCheckable(true); m_view = new MainView(parent, previewAction); m_note = m_view->note; setupAction(); setupUI(); setupConnect(); }
admin::admin(QWidget * parent) : QMainWindow(parent), settings(QSettings::IniFormat, QSettings::UserScope,"QtLog", "qtlog") { setupUi(this); n = settings.value("FontSize").toString().toInt(); QFont font; font.setPointSize(n); setFont(font); connect(actionEnde, SIGNAL(triggered(bool)), this, SLOT(goExit())); connect(actionAdif_Export, SIGNAL(triggered(bool)), this, SLOT(adifExpCb())); connect(actionAdif_Import, SIGNAL(triggered(bool)), this, SLOT(adifImpCb())); connect(actionDump, SIGNAL(triggered(bool)), this, SLOT(dumpCb())); connect(actionRefNamen, SIGNAL(triggered(bool)), this, SLOT(refNamenCb())); connect(actionHilfe, SIGNAL(triggered(bool)), this, SLOT(getHilfeCb())); connect(pushButtonEnde, SIGNAL(clicked()), this, SLOT(goExit())); connect(stackedWidget, SIGNAL(currentChanged(int)), this, SLOT(stackedWidgetCb(int))); connect(checkBoxLog, SIGNAL(pressed()), this, SLOT(toggelLogBoxCb())); connect(checkBoxDb, SIGNAL(pressed()), this, SLOT(toggelDbBoxCb())); connect(checkBoxQslMode, SIGNAL(pressed()), this, SLOT(toggelQslModeCb())); connect(logList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(logListCb(QTreeWidgetItem*,int))); connect(sysList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(sysListCb(QTreeWidgetItem*,int))); connect(RefTable, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(updateRefItemCb(QTableWidgetItem*))); connect(RefTable, SIGNAL(itemClicked(QTableWidgetItem*)), this, SLOT(saveValCb(QTableWidgetItem*))); connect(customsTable, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(updateCustomItemCb(QTableWidgetItem*))); connect(customsTable, SIGNAL(itemClicked(QTableWidgetItem*)), this, SLOT(saveValCb(QTableWidgetItem*))); connect(ButtonDumpDir, SIGNAL(clicked()), this, SLOT(getSaveDirCb())); connect(ButtonAdifDir, SIGNAL(clicked()), this, SLOT(getAdifDirCb())); connect(ButtonDump, SIGNAL(clicked()), this, SLOT(dbDump())); connect(ButtonRestore, SIGNAL(clicked()), this, SLOT(dbRestore())); connect(ButtonAdifExport, SIGNAL(clicked()), this, SLOT(adifExport())); connect(ButtonAdifImport, SIGNAL(clicked()), this, SLOT(adifImport())); s = settings.value("dbname").toString(); s += " Rel.: "; s += RELEASE; label_db->setText(s); label_dbase->setText(s); dirsel = 0; setupAction(); lItem = 0; sItem = 0; udpSocket = new QUdpSocket(this); ltreeWidget = logList; }
AudioManager::AudioManager(QWidget *parent) : QWidget(parent) { inputSource = new AudioInputAnlyzer(2, Qt::yellow, 4096, parent); fileSource = new AudioFileAnlyzer(QColor(51, 128, 255, 240), 4096, parent); cinfoList.append(inputSource->getCInfo()); qRegisterMetaType<FloatArray>("FloatArray"); qRegisterMetaType<SpecGramArray>("SpecGramArray"); connect(inputSource, SIGNAL(sendData(CHANNELINFO*,FloatArray,FloatArray,FloatArray,SpecGramArray)), this, SLOT(retriveData(CHANNELINFO*,FloatArray,FloatArray,FloatArray,SpecGramArray))); connect(fileSource, SIGNAL(sendData(CHANNELINFO*,FloatArray,FloatArray,FloatArray,SpecGramArray)), this, SLOT(retriveData(CHANNELINFO*,FloatArray,FloatArray,FloatArray,SpecGramArray))); setupAction(); setupUI(); this->setAcceptDrops(true); connect(&t, SIGNAL(timeout()), this, SLOT(process())); connect(fileSource, SIGNAL(lengthChanged(int)), this, SIGNAL(lengthChanged(int))); connect(fileSource, SIGNAL(posChanged(int)), this, SIGNAL(posChanged(int))); //connect(inputSource, SIGNAL(sendt(int)), fileSource, SLOT(setTempo(int))); t.start(20); }
MainWindow::MainWindow() : m_markpad(0) , m_recentFiles(0) , m_firstTextChange(false) { m_markpad = new Markpado(this); setupAction(); setupConnect(); setCentralWidget(m_markpad); setupGUI(QSize(500,600), Default, "markpado.rc"); guiFactory()->addClient(m_markpad->m_editor); setStandardToolBarMenuEnabled(true); setAutoSaveSettings(); readConfig(); show(); }