本文整理汇总了C++中QMdiSubWindow::setAttribute方法的典型用法代码示例。如果您正苦于以下问题:C++ QMdiSubWindow::setAttribute方法的具体用法?C++ QMdiSubWindow::setAttribute怎么用?C++ QMdiSubWindow::setAttribute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMdiSubWindow
的用法示例。
在下文中一共展示了QMdiSubWindow::setAttribute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: oporTest
void RadMainWindow :: oporTest (void)
{
complex<double> * opor = new complex<double> [nd];
complex<double> * opor2 = new complex<double> [nd];
for (int i=0; i<nd; i++)
{
opor[i] = complex<double>(0.0, 0.0);
opor2[i] = complex<double>(0.0, 0.0);
}
for (int n=0; n< N1; n++)
{
double phase = pi*fsp*n*n/(N1*fcvant2) - pi*fsp*n/fcvant2 ;
double oc = cos (phase);
double os = sin (phase);
opor[n] = complex<double>(oc, os);
}
int N2 = (N1/2);
for (int i=0; i<N2; i++)
{
opor2[i] = opor[i+N2];
opor2[i+nd-N2] = opor[i];
}
radDataWidget * wOp = new radDataWidget (opor, N1);
QMdiSubWindow * subWop = m_mdiArea->addSubWindow (wOp);
wOp->setWindowTitle (tr("Opor before FFT"));
wOp->show ();
subWop->setAttribute (Qt::WA_DeleteOnClose);
FFT_Transform fft;
int nfft = nd;//4*FFT_Transform :: pow2roundup(N1);
opor = fft (opor2, nfft, nfft, FFTW_FORWARD, FFTW_ESTIMATE);
complex<double> * oporFFT = new complex<double> [nd];
for (int i=0; i<nd; i++)
{
double re = real(opor[i])*nfft;
double im = imag (opor[i])*nfft;
oporFFT[i] = complex<double>(re, im);
}
radDataWidget * wOpFFT = new radDataWidget (oporFFT, N1);
wOpFFT->setWindowTitle (tr("Opor after FFT"));
QMdiSubWindow * subWopFFT = m_mdiArea->addSubWindow (wOpFFT);
wOpFFT->show ();
subWopFFT->setAttribute (Qt::WA_DeleteOnClose);
delete [] opor2;
delete [] opor;
delete [] oporFFT;
}
示例2: nMatr
void RadMainWindow :: slotFFT2Test (void)
{
int nMatr (8);
CMatrix tMatr (0.0, nMatr, nMatr);
FFT2_Transform fft2;
for (int i=0; i<nMatr; i++)
{
for (int j=i; j<nMatr; j++)
{
double rcorr = 0.5*cos (2*pi/4*(j-i))*(0.1e1-(j-i)/((double) nMatr));
double icorr = 0.5*sin (2*pi/4*(j-i))*(0.1e1-(j-i)/((double) nMatr));
tMatr(i, j) = complex<double> (rcorr, icorr);
tMatr(j, i) = complex<double> (rcorr, icorr);
}
}
/* complex<double> * cm = tMatr.getData();
for (int i=0; i<nMatr*nMatr; i++)
qDebug () << __PRETTY_FUNCTION__ << real (cm[i]) << imag (cm[i]);
*/
radTableWidget * wMatr = new radTableWidget (tMatr.getData(), nMatr, nMatr);
wMatr->setWindowTitle (tr("Source matrix"));
QMdiSubWindow * subWMatr = m_mdiArea->addSubWindow (wMatr);
wMatr->show();
subWMatr->setAttribute (Qt::WA_DeleteOnClose);
complex<double> * tMatrFFTData = fft2 (tMatr.getData(), nMatr, nMatr, FFTW_FORWARD, FFTW_ESTIMATE);
CMatrix tMatrFFT (nMatr, nMatr);
for (int i=0; i<nMatr; i++)
{
for (int j=0; j<nMatr; j++)
{
tMatrFFT(i, j) = tMatrFFTData[j+nMatr*i];
}
}
delete [] tMatrFFTData;
radTableWidget * wMatrFFT = new radTableWidget (tMatrFFT.getData(), nMatr, nMatr);
wMatrFFT->setWindowTitle (tr("Source matrix after FFT"));
QMdiSubWindow * subWMatrFFT = m_mdiArea->addSubWindow (wMatrFFT);
wMatrFFT->show();
subWMatrFFT->setAttribute (Qt::WA_DeleteOnClose);
complex<double> * tMatrFFTRevData = fft2 (tMatrFFT.getData(), nMatr, nMatr, FFTW_BACKWARD, FFTW_ESTIMATE);
radTableWidget * wMatrFFTRev = new radTableWidget (tMatrFFTRevData, nMatr, nMatr);
wMatrFFTRev->setWindowTitle (tr("Source matrix after forward and backward FFT"));
QMdiSubWindow * subWMatrFFTRev = m_mdiArea->addSubWindow (wMatrFFTRev);
wMatrFFTRev->show();
subWMatrFFTRev->setAttribute (Qt::WA_DeleteOnClose);
delete [] tMatrFFTRevData;
}
示例3: openForm
void PERPMainWindow::openForm(const QString &actionName)
{
QString tableName = actionName;
tableName.replace("table_", "");
QString formName = QString("mdiform_%1").arg(tableName);
if ( d->m_mapeoVentanas.contains(formName) ) {
d->m_mdiArea->setActiveSubWindow(d->m_mapeoVentanas.value(formName));
return;
}
DBFormDlg *dlg = new DBFormDlg(tableName, this);
if ( dlg->openSuccess() ) {
// Muy importante para el mapeo MDI
dlg->setObjectName(formName);
dlg->setAttribute(Qt::WA_DeleteOnClose);
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
dlg->init();
QApplication::restoreOverrideCursor();
QMdiSubWindow *subWin = d->m_mdiArea->addSubWindow(dlg);
d->m_mapeoVentanas.insert(formName, subWin);
subWin->setOption(QMdiSubWindow::RubberBandResize, true);
subWin->setOption(QMdiSubWindow::RubberBandMove, true);
// Guardamos una referencia al objeto
subWin->setAttribute(Qt::WA_DeleteOnClose);
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
subWin->show();
QApplication::restoreOverrideCursor();
connect (dlg, SIGNAL(closingWindow(QWidget *)), this, SLOT(closeSubWindow(QWidget *)));
connect (subWin, SIGNAL(aboutToActivate()), dlg, SLOT(refreshFilterTableView()));
configuracion.applyDimensionForm(subWin);
} else {
示例4: loadFixtureDefinition
void App::loadFixtureDefinition(const QString& path)
{
QLCFixtureDef* fixtureDef = NULL;
/* Attempt to create a fixture definition from the selected file */
QString error(tr("Unrecognized file extension: %1").arg(path));
if (path.toLower().endsWith(KExtFixture) == true)
fixtureDef = loadQXF(path, error);
else if (path.toLower().endsWith(KExtAvolitesFixture) == true)
fixtureDef = loadD4(path, error);
else
fixtureDef = NULL;
if (fixtureDef != NULL)
{
/* Create a new sub window and put a fixture editor widget
in that sub window with the newly-created fixture def */
QMdiSubWindow* sub = new QMdiSubWindow(centralWidget());
QLCFixtureEditor* editor = new QLCFixtureEditor(sub, fixtureDef, path);
sub->setWidget(editor);
sub->setAttribute(Qt::WA_DeleteOnClose);
qobject_cast<QMdiArea*> (centralWidget())->addSubWindow(sub);
editor->show();
sub->show();
}
else
{
QMessageBox::warning(this, tr("Fixture loading failed"),
tr("Unable to load fixture definition: ") + error);
}
}
示例5: new_combo_trade
void MainWindow::new_combo_trade()
{
ComboTradeDialog *comboTradeDialog = new ComboTradeDialog;
QMdiSubWindow *qMdiSubWindow = ui_->mdiArea_combo->addSubWindow(comboTradeDialog);
qMdiSubWindow->setAttribute(Qt::WA_DeleteOnClose);
qMdiSubWindow->setFixedSize(320, 240);
qMdiSubWindow->setWindowFlags(qMdiSubWindow->windowFlags()& ~Qt::WindowMaximizeButtonHint& ~Qt::WindowMinimizeButtonHint);
qMdiSubWindow->show();
}
示例6: initConvAz
void RadMainWindow :: initConvAz (void)
{
RadarImageProc * rdConv = RadarImageProc::getRadarImage();
if (!rdConv)
return;
ConvAzimuthWidget * cW = rdConv->getCAzWidget();
QMdiSubWindow * subCW = m_mdiArea->addSubWindow (cW);
cW->show();
subCW->setAttribute (Qt::WA_DeleteOnClose);
}
示例7: react
void FileNewController::react() {
qDebug() << "Creating new window";
EditSubWindow *newEditWindow = new EditSubWindow(&mdiMain);
BufferRef buffer = bufferPool.getEmptyBuffer();
newEditWindow->setBuffer(buffer);
newEditWindow->show();
QMdiSubWindow *subWindow = mdiMain.addSubWindow(newEditWindow);
subWindow->setAttribute(Qt::WA_DeleteOnClose);
subWindow->show();
}
示例8: qDebug
void RadMainWindow :: slot3DMod (void)
{
qDebug () << __PRETTY_FUNCTION__;
imageCreatorForm * icf = new imageCreatorForm (0);
connect (icf, SIGNAL (imagesData(generatingDataPlus)), this, SLOT (slotGologramCalc(generatingDataPlus)) );
QMdiSubWindow * subCW = m_mdiArea->addSubWindow (icf);
connect (icf, SIGNAL (rejected()), subCW, SLOT (close()) );
icf->show();
subCW->setAttribute (Qt::WA_DeleteOnClose);
//icf->exec();
}
示例9: showEncuesta
void MainWindow::showEncuesta() {
if (encuesta == 0) {
encuesta = new EncuestadorForm;
QMdiSubWindow *subWin = mdiArea->addSubWindow(encuesta, Qt::SubWindow);
subWin->setAttribute(Qt::WA_DeleteOnClose);
encuesta->setParent(subWin);
}
encuesta->setWindowState(Qt::WindowMaximized);
encuesta->show();
encuesta->setFocus(Qt::ActiveWindowFocusReason);
connect(encuesta, SIGNAL(destroyed()), this, SLOT(hideEncuesta()));
}
示例10: showBarrio
void MainWindow::showBarrio() {
if (barrio == 0) {
barrio = new BarrioForm;
QMdiSubWindow *subWin = mdiArea->addSubWindow(barrio, Qt::SubWindow);
subWin->setAttribute(Qt::WA_DeleteOnClose);
barrio->setParent(subWin);
}
barrio->setWindowState(Qt::WindowMaximized);
barrio->show();
barrio->setFocus(Qt::ActiveWindowFocusReason);
connect(barrio, SIGNAL(destroyed()), this, SLOT(hideBarrio()));
}
示例11: showListado
void MainWindow::showListado() {
if (listado == 0) {
listado = new Listado;
QMdiSubWindow *subWin = mdiArea->addSubWindow(listado, Qt::SubWindow);
subWin->setAttribute(Qt::WA_DeleteOnClose);
listado->setParent(subWin);
}
listado->setWindowState(Qt::WindowMaximized);
listado->show();
listado->setFocus(Qt::ActiveWindowFocusReason);
connect(listado, SIGNAL(destroyed()), this, SLOT(hideListado()));
}
示例12:
// função auxiliar que cria nova instância de uma "subWindow",
// já definindo qual será o "internal widget" dessa "subWindow":
QMdiSubWindow * MainWindow::createSubWindow_( QWidget * internalWidget )
{
//Uma nova instância de determinada "subWindow" é criada
// e adicionada ao objeto "mdiArea".
// E um determinado "widget" é passado aqui para que se torne
// o "internal Widget" dessa "subWindow":
QMdiSubWindow * subWin = ui->mdiArea->addSubWindow( internalWidget );
// Atributo "DeleteOnClose": no evento "close" dessa "subWindow",
// a instância do objeto "QMdiSubWindow" será liberada/destruída:
subWin->setAttribute(Qt::WA_DeleteOnClose);
return subWin; // retorna endereço da nova "subWindow"
}
示例13: new_swing_trade
void MainWindow::new_swing_trade()
{
QString contractName = tr("Exchange-Contract-").append(QString("%1").arg(swing_counter_));
SwingTradeDialog *swingTradeDialog = new SwingTradeDialog(contractName, swing_counter_, disp_, this);
connect(swingTradeDialog, SIGNAL(update_contract(QString)), this, SLOT(update_swing_contract(QString)));
QMdiSubWindow *qMdiSubWindow = ui_->mdiArea_swing->addSubWindow(swingTradeDialog);
qMdiSubWindow->setAttribute(Qt::WA_DeleteOnClose);
qMdiSubWindow->setFixedSize(265, 440);
qMdiSubWindow->setWindowFlags(qMdiSubWindow->windowFlags()& ~Qt::WindowMaximizeButtonHint& ~Qt::WindowMinimizeButtonHint);
qMdiSubWindow->setWindowTitle(contractName);
qMdiSubWindow->show();
swing_counter_++;
selcon_->setCurrentText(contractName);
}
示例14: slotFileNew
void App::slotFileNew()
{
QLCFixtureEditor* editor;
QMdiSubWindow* sub;
sub = new QMdiSubWindow(centralWidget());
editor = new QLCFixtureEditor(sub, new QLCFixtureDef());
sub->setWidget(editor);
sub->setAttribute(Qt::WA_DeleteOnClose);
sub->setWindowIcon(QIcon(":/fixture.png"));
qobject_cast<QMdiArea*> (centralWidget())->addSubWindow(sub);
editor->show();
sub->show();
}
示例15: insertPlot
PlotWithCurves* Group::insertPlot()
{
QMdiSubWindow* window = new QMdiSubWindow;
{
window->setMinimumSize(250, 150);
window->setWindowIcon(QIcon(":/res/mainWindow/closeAllPlots.png"));
window->setAttribute(Qt::WA_DeleteOnClose);
}
PlotWithCurves* plot = new PlotWithCurves(samplesManager, curvesManagerView, window);
{
plot->connect(plot, SIGNAL(destroyed()), this, SLOT(retitle()));
window->setWidget(plot);
addSubWindow(window);
window->show();
retitle();
}
return plot;
}