Exemple #1
0
DCTLabDialog::DCTLabDialog(QString file, QWidget *parent) : QDialog(parent), A(8,8), M(8,8), iv(file)
{
	connect(&mask, SIGNAL(maskChanged(Matrix)),this, SLOT(setMaskMatrix(Matrix)));
	connect(&iv, SIGNAL(selectionChanged(Matrix)), this, SLOT(setDataMatrix(Matrix)));
	connect(this, SIGNAL(dataChanged(Matrix)), &orig, SLOT(setMatrix(Matrix)));
	connect(this, SIGNAL(dataChanged(Matrix)), &trans, SLOT(setMatrix(Matrix)));
	connect(this, SIGNAL(dataChanged(Matrix)), &rec, SLOT(setMatrix(Matrix)));
	connect(this, SIGNAL(maskChanged(Matrix)), &rec, SLOT(setMask(Matrix)));
	connect(this, SIGNAL(dataChanged(Matrix)), &diff, SLOT(setMatrix(Matrix)));
	connect(this, SIGNAL(maskChanged(Matrix)), &diff, SLOT(setMask(Matrix)));
	
	mvLayout1.addWidget(new QLabel("Original:"));
	mvLayout1.addWidget(&orig);
	mvLayout1.addWidget(new QLabel("DCT coefficients:"));
	mvLayout1.addWidget(&trans);
	mvLayout1.addWidget(new QLabel("Mask(click):"));
	mvLayout1.addWidget(&mask);
	mvLayout1.addStretch();
	
	mvLayout2.addWidget(new QLabel("Reconstruction:"));
	mvLayout2.addWidget(&rec);
	mvLayout2.addWidget(new QLabel("Error signal:"));
	mvLayout2.addWidget(&diff);
	mvLayout2.addWidget(&stats);
	mvLayout2.addStretch();
	
	mainLayout.addWidget(&iv);
	mainLayout.addLayout(&mvLayout1);
	mainLayout.addLayout(&mvLayout2);
	setLayout(&mainLayout);
}
Exemple #2
0
void QDepthMask::setMask(bool mask)
{
    Q_D(QDepthMask);
    if (d->m_mask != mask) {
        d->m_mask = mask;
        emit maskChanged();
    }
}
void QuickMaskEffect::setMask(QDeclarativeItem *mask)
{
    if (m_mask != mask) {
        m_mask = mask;
        update();
        emit maskChanged(mask);
    }
}
void MaskedItem::setMask(QDeclarativeComponent *component)
{
    if (m_maskComponent == component)
        return;

    QDeclarativeItem *mask = 0;

    if (component) {
        QObject *object = component->create(component->creationContext());
        mask = qobject_cast<QDeclarativeItem *>(object);

        if (!mask)
            qWarning("MaskedItem: Unable to create mask element.");
        else if (!mask->childItems().isEmpty())
            qWarning("MaskedItem: Mask element has children. Due to current limitation, they won't be painted.");
    }

    m_effect->setMask(mask);
    m_maskComponent = component;

    emit maskChanged();
}
Exemple #5
0
void MainWindow::showMenuMask() {
    d->maskMenu = new MaskMenu(0, d->SIZE_X - 4, d->SIZE_Y - 4);
    connect(d->maskMenu, SIGNAL(maskChanged(std::vector<bool>)), this,
        SLOT(setMask(std::vector<bool>)));
    d->maskMenu->show();
}
Exemple #6
0
RegistrationWizard::RegistrationWizard(const QString &startMask,KviRegisteredUserDataBase * db,QWidget * par,bool bModal)
: KviTalWizard(par)
{
	m_pDb = db;

	setModal(bModal);

	m_bModal = bModal;

	KviIrcMask mask(!startMask.isEmpty() ? startMask.toUtf8().data() : "*!*@*");

	g_pRegistrationWizardList->append(this);

	QGridLayout* m_pPage1Layout;
	QGridLayout* m_pPage2Layout;
	QGridLayout* m_pPage3Layout;
	QGridLayout* m_pPage4Layout;
	QGridLayout* m_pPage5Layout;

	QLabel* TextLabel10_2;
	QLabel* TextLabel10;
	QLabel* TextLabel10_3;
	QLabel* TextLabel10_3_2;

	QFrame * f;

//    resize( 490, 456 );
	setWindowTitle(__tr2qs_ctx("User Registration Wizard - KVIrc","register"));
	setWindowIcon(*(g_pIconManager->getSmallIcon(KviIconManager::Linux)));

	setSizeGripEnabled(true);

	m_pPage1 = new QWidget(this);
	m_pPage1Layout = new QGridLayout(m_pPage1);
	m_pPage1Layout->setSpacing(4);
	m_pPage1Layout->setMargin(8);

	m_pLabel1 = new QLabel(m_pPage1);
	m_pLabel1->setText(__tr2qs_ctx("<p>Welcome to the user registration wizard.<br>This process allows you to add an IRC user to the database and set properties for that user. KVIrc will be (hopefully) able to recognize the user, add him to the notify list, and display the associated avatar.<br><br>First of all, you must insert an <b>entry name or real name</b> for the user you're going to register. The name will be used to identify the database entry and has no specific requirements, it can be a given name, nickname, or just some text to remind you of the real person.<br>Examples: \"George W Bush\", \"Dubya\".\n</p>","register"));
	m_pLabel1->setWordWrap(true);

	m_pPage1Layout->addWidget(m_pLabel1,0,0,1,2);

	m_pEditRealName = new QLineEdit(m_pPage1);
	//m_pEditRealName->setAlignment(int(QLineEdit::AlignHCenter));

	m_pPage1Layout->addWidget(m_pEditRealName,3,1);

	m_pEntryNameLabel = new QLabel(m_pPage1);
	m_pEntryNameLabel->setText(__tr2qs_ctx("Entry name:","register"));
	m_pPage1Layout->addWidget(m_pEntryNameLabel,3,0);
	m_pPage1Layout->setRowStretch(1,1);

	addPage( m_pPage1,__tr2qs_ctx("Step 1: Entry Name","register"));

	if(mask.nick() != "*")m_pEditRealName->setText(mask.nick());

	connect(m_pEditRealName,SIGNAL(textChanged(const QString &)),this,SLOT(realNameChanged(const QString &)));

	// PAGE 2

	m_pPage2 = new QWidget(this);
	m_pPage2Layout = new QGridLayout(m_pPage2);
	m_pPage2Layout->setSpacing(4);
	m_pPage2Layout->setMargin(8);

	m_pLabel2 = new QLabel( m_pPage2);
	m_pLabel2->setText(__tr2qs_ctx("<p>A registered user is identified by one or more <b>IRC masks</b>.<br>A mask must be in the following form:<br><b>nickname!username@hostname</b><br>and can contain wildcard characters '*' and '?'. Be careful in choosing the masks, as they are the only way to verify the identity of a registered user.<br><br>You can enter at most two masks here, if you wish to add more masks, use the \"<b>Edit</b>\" button in the Registered Users dialog. You must enter at least one mask.</p>","register"));
	m_pLabel2->setWordWrap(true);

	m_pPage2Layout->addWidget(m_pLabel2,0,0,1,5);

	//KviCString szMask;

	//mask.mask(szMask,11);

	//KviIrcMask masktempl(szMask.ptr());

	m_pNicknameEdit1 = new QLineEdit(m_pPage2);
	m_pNicknameEdit1->setAlignment(Qt::AlignRight);
	if(mask.nick() != "*")m_pNicknameEdit1->setText(mask.nick());
	connect(m_pNicknameEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(maskChanged(const QString &)));
	m_pPage2Layout->addWidget( m_pNicknameEdit1,3,0);

	m_pUsernameEdit1 = new QLineEdit(m_pPage2);
	m_pUsernameEdit1->setAlignment(Qt::AlignHCenter);
	if(mask.hasUser())m_pUsernameEdit1->setText(mask.user());
	connect(m_pUsernameEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(maskChanged(const QString &)));
	m_pPage2Layout->addWidget(m_pUsernameEdit1,3,2);

	m_pHostEdit1 = new QLineEdit(m_pPage2);
	if(mask.hasHost())m_pHostEdit1->setText(mask.host());
	connect(m_pHostEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(maskChanged(const QString &)));
	m_pPage2Layout->addWidget(m_pHostEdit1,3,4);

	m_pNicknameEdit2 = new QLineEdit(m_pPage2);
	m_pNicknameEdit2->setAlignment(Qt::AlignRight);
	m_pPage2Layout->addWidget(m_pNicknameEdit2,4,0);

	m_pUsernameEdit2 = new QLineEdit(m_pPage2);
	m_pUsernameEdit2->setAlignment(Qt::AlignHCenter);
	m_pPage2Layout->addWidget(m_pUsernameEdit2,4,2);

	m_pHostEdit2 = new QLineEdit(m_pPage2);
	m_pPage2Layout->addWidget(m_pHostEdit2,4,4);

	TextLabel10_2 = new QLabel(m_pPage2);
	TextLabel10_2->setText("<b>!</b>");
	TextLabel10_2->setAlignment(Qt::AlignCenter);
	m_pPage2Layout->addWidget(TextLabel10_2,4,1);

	TextLabel10 = new QLabel(m_pPage2);
	TextLabel10->setText("<b>!</b>");
	TextLabel10->setAlignment(Qt::AlignCenter);
	m_pPage2Layout->addWidget(TextLabel10,3,1);

	TextLabel10_3 = new QLabel(m_pPage2);
	TextLabel10_3->setText("<b>@</b>");
	TextLabel10_3->setAlignment(Qt::AlignCenter);
	m_pPage2Layout->addWidget(TextLabel10_3,3,3);

	TextLabel10_3_2 = new QLabel(m_pPage2);
	TextLabel10_3_2->setText("<b>@</b>");
	TextLabel10_3_2->setAlignment(Qt::AlignCenter);
	m_pPage2Layout->addWidget(TextLabel10_3_2,4,3);
	m_pPage2Layout->setRowStretch(1,1);

	addPage(m_pPage2,__tr2qs_ctx("Step 2: Mask Selection","register"));

	// PAGE 3

	m_pPage3 = new QWidget(this);
	m_pPage3Layout = new QGridLayout(m_pPage3);
	m_pPage3Layout->setSpacing(4);
	m_pPage3Layout->setMargin(8);

	m_pLabel3 = new QLabel(m_pPage3);
	m_pLabel3->setText(__tr2qs_ctx("<p>If you want to store an avatar image for this user, you can set it here. KVIrc will show the avatar in the userlist next to the user's nickname.<br>An avatar can be in any supported image format (PNG is recommended). Keep in mind that KVIrc stores avatars in memory and has to resize them to fit in the userlist, thus it's better to use small, low-resolution images.</p>","register"));
	m_pLabel3->setWordWrap(true);
	m_pPage3Layout->addWidget(m_pLabel3,0,0);

	f = new QFrame(m_pPage3);
	f->setFrameStyle(QFrame::HLine | QFrame::Sunken);
	m_pPage3Layout->addWidget(f,1,0);

	m_pAvatar = new KviPixmap();
	m_pAvatarSelector = new KviPixmapSelector(m_pPage3,__tr2qs_ctx("Store an avatar for this user:"******"register"),m_pAvatar,true);
	m_pPage3Layout->addWidget(m_pAvatarSelector,2,0);
	m_pPage3Layout->setRowStretch(2,1);

	addPage(m_pPage3,__tr2qs_ctx("Step 3: Avatar Selection","register"));

	// PAGE 4

	m_pPage4 = new QWidget(this);
	m_pPage4Layout = new QGridLayout(m_pPage4);
	m_pPage4Layout->setSpacing(4);
	m_pPage4Layout->setMargin(8);

	m_pLabel4 = new QLabel(m_pPage4);
	m_pLabel4->setText(__tr2qs_ctx("<p>If you want to be notified when this user is online or goes offline, you must specify the list of nicknames that KVIrc will look for.<br><br>You can enter at most two nicknames here, if you wish to add more nicknames, use the \"<b>Edit</b>\" button in the  \"Registered Users\" dialog.</p>","register"));
	m_pLabel4->setWordWrap(true);
	m_pPage4Layout->addWidget(m_pLabel4,0,0,1,5);

	m_pNotifyCheck = new QCheckBox(m_pPage4);
	m_pNotifyCheck->setText(__tr2qs_ctx("Add this user to the notify list","register"));
	m_pNotifyCheck->setChecked(false);
	connect(m_pNotifyCheck,SIGNAL(toggled(bool)),this,SLOT(notifyCheckToggled(bool)));
	m_pPage4Layout->addWidget(m_pNotifyCheck,3,0,1,2);

	m_pNotifyNickLabel1 = new QLabel(m_pPage4);
	m_pNotifyNickLabel1->setText(__tr2qs_ctx("Nickname:","register"));
	m_pPage4Layout->addWidget(m_pNotifyNickLabel1,4,0);

	m_pNotifyNickLabel2 = new QLabel(m_pPage4);
	m_pNotifyNickLabel2->setText(__tr2qs_ctx("Nickname 2:","register"));
	m_pPage4Layout->addWidget(m_pNotifyNickLabel2,5,0);

	m_pNotifyNickEdit1 = new QLineEdit(m_pPage4);
	if(mask.nick() != "*")m_pNotifyNickEdit1->setText(mask.nick());
	connect(m_pNotifyNickEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(notifyNickChanged(const QString &)));
	m_pPage4Layout->addWidget(m_pNotifyNickEdit1,4,1);

	m_pNotifyNickEdit2 = new QLineEdit(m_pPage4);
	connect(m_pNotifyNickEdit2,SIGNAL(textChanged(const QString &)),this,SLOT(notifyNickChanged(const QString &)));
	m_pPage4Layout->addWidget(m_pNotifyNickEdit2,5,1);
	m_pPage4Layout->setRowStretch(1,1);

	addPage(m_pPage4,__tr2qs_ctx("Step 4: Notify List","register"));

	// PAGE 5

	m_pPage5 = new QWidget(this);
	m_pPage5Layout = new QGridLayout(m_pPage5);
	m_pPage5Layout->setSpacing(4);
	m_pPage5Layout->setMargin(8);

	m_pTextLabel5 = new QLabel(m_pPage5);
	m_pTextLabel5->setText(__tr2qs_ctx("<p>That's it. The user registration has been completed.<br><br>Click \"<b>Finish</b>\" to close this dialog.</p>","register"));
	m_pTextLabel5->setWordWrap(true);
	m_pPage5Layout->addWidget(m_pTextLabel5,0,0);
	m_pPage5Layout->setRowStretch(1,1);

	addPage(m_pPage5,__tr2qs_ctx("Registration Complete","register"));

	setFinishEnabled(m_pPage5,true);
	QString dummy;
	maskChanged(dummy);
	realNameChanged(dummy);
	notifyCheckToggled(false);

	setMinimumSize(QSize(350,420));

	// signals and slots connections
}
void PhysicsBodyInfo::setMask(int mask){
    if(mask >0 && m_mask!=mask){
        m_mask=mask;
        emit maskChanged(m_mask);
    }
}
Exemple #8
0
void QxrdMaskStack::changed()
{
  emit maskChanged();
}
QxrdMaskStackModel::QxrdMaskStackModel(QxrdMaskStackPtr masks) :
    m_MaskStack(masks)
{
  connect(masks, SIGNAL(maskChanged()), this, SLOT(onMaskChanged()));
}
Exemple #10
0
void DCTLabDialog::setMaskMatrix(Matrix MM)
{
	M = MM;
	emit maskChanged(M);
	updateStats();
}
void IndirectSpectrumSelectionView::emitMaskChanged() {
  emit maskChanged(m_selector->leMaskBins->text().toStdString());
}
void QFRDRFCSCrossCorrelationEditor::createWidgets() {
    correlationMaskTools=new QFCorrelationMaskTools(this);
    connect(correlationMaskTools, SIGNAL(maskChanged()), this, SLOT(rawDataChangedRecalc()));

    QVBoxLayout* l=new QVBoxLayout();
    setLayout(l);
    splitter=new QVisibleHandleSplitter(Qt::Horizontal, this);
    l->addWidget(splitter);

    QWidget* w=new QWidget(this);
    QGridLayout* gl=new QGridLayout();
    w->setLayout(gl);
    cmbAverageErrors=new QComboBox(w);
    gl->addWidget(new QLabel(tr("display average:")), 0, 0);
    gl->addWidget(cmbAverageErrors, 0, 1);
    cmbAverageErrors->addItem(QIcon(":/fcs/fcsplot_enone.png"), tr("no average"));
    cmbAverageErrors->addItem(QIcon(":/fcs/fcsplot_enone.png"), tr("no errors"));
    cmbAverageErrors->addItem(QIcon(":/fcs/fcsplot_elines.png"), tr("with error lines"));
    cmbAverageErrors->addItem(QIcon(":/fcs/fcsplot_ebars.png"), tr("with error bars"));
    cmbAverageErrors->addItem(QIcon(":/fcs/fcsplot_elinesbars.png"), tr("with lines and bars"));
    cmbAverageErrors->addItem(QIcon(":/libqf3widgets/plot_epoly.png"), tr("with error polygons"));
    cmbAverageErrors->addItem(QIcon(":/libqf3widgets/plot_epolybars.png"), tr("with polygons and bars"));
    connect(cmbAverageErrors, SIGNAL(currentIndexChanged(int)), this, SLOT(replotData(int)));

    cmbRunDisplay=new QComboBox(w);
    gl->addWidget(new QLabel(tr("display runs:")), 1, 0);
    gl->addWidget(cmbRunDisplay, 1, 1);
    cmbRunDisplay->addItem(tr("average only"));
    cmbRunDisplay->addItem(tr("selected run"));
    connect(cmbRunDisplay, SIGNAL(currentIndexChanged(int)), this, SLOT(runsModeChanged(int)));

    cmbRunErrors=new QComboBox(w);
    gl->addWidget(new QLabel(tr("run errors:")), 2, 0);
    gl->addWidget(cmbRunErrors, 2, 1);
    cmbRunErrors->addItem(QIcon(":/fcs/fcsplot_enone.png"), tr("no errors"));
    cmbRunErrors->addItem(QIcon(":/fcs/fcsplot_elines.png"), tr("with error lines"));
    cmbRunErrors->addItem(QIcon(":/fcs/fcsplot_ebars.png"), tr("with error bars"));
    cmbRunErrors->addItem(QIcon(":/fcs/fcsplot_elinesbars.png"), tr("with lines and bars"));
    cmbRunErrors->addItem(QIcon(":/libqf3widgets/plot_epoly.png"), tr("with error polygons"));
    cmbRunErrors->addItem(QIcon(":/libqf3widgets/plot_epolybars.png"), tr("with polygons and bars"));
    connect(cmbRunErrors, SIGNAL(currentIndexChanged(int)), this, SLOT(replotData(int)));

    lstRunsSelect=new QListView(w);
    lstRunsSelect->setModel(runs);
    lstRunsSelect->setSelectionMode(QAbstractItemView::ExtendedSelection);
    connect(lstRunsSelect->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), this, SLOT(selectionChanged(const QItemSelection &, const QItemSelection &)));
    connect(lstRunsSelect->selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(selectionChanged(const QModelIndex &, const QModelIndex &)));


    gl->addWidget(new QLabel(tr("select runs to display:")), 3, 0, 1, 2);
    gl->addWidget(lstRunsSelect, 4, 0, 3, 2);
    gl->setRowStretch(4, 2);
    btnDontUse=new QPushButton(tr("exclude selected"), w);
    connect(btnDontUse, SIGNAL(clicked()), this, SLOT(excludeRuns()));
    gl->addWidget(btnDontUse, 7, 0, 1, 2);
    btnUse=new QPushButton(tr("include selected"), w);
    connect(btnUse, SIGNAL(clicked()), this, SLOT(includeRuns()));
    gl->addWidget(btnUse, 8, 0, 1, 2);

    chkLogTauAxis=new QCheckBox("", w);
    gl->addWidget(new QLabel(tr("log-scale on<br>lag time axis:")), 9, 0);
    gl->addWidget(chkLogTauAxis, 9, 1);
    connect(chkLogTauAxis, SIGNAL(toggled(bool)), this, SLOT(replotData()));

    grpInfo=new QGroupBox(tr("Info"), w);
    QGridLayout* ggl=new QGridLayout();
    grpInfo->setLayout(ggl);
    ggl->addWidget(new QLabel(tr("# Runs = ")), 0, 0);
    labRuns=new QLabel(grpInfo);
    ggl->addWidget(labRuns, 0,1);
    ggl->addWidget(new QLabel(tr("# Points = ")), 1, 0);
    labCorrelationPoints=new QLabel(grpInfo);
    ggl->addWidget(labCorrelationPoints, 1,1);
    gl->addWidget(grpInfo, 10,0,1,2);



    grpRelCCF=new QGroupBox(tr("rel. CCF"), w);
    QFormLayout* ggrcl=new QFormLayout();
    grpRelCCF->setLayout(ggrcl);

    cmbFCCSCorrected=new QComboBox(this);
    cmbFCCSCorrected->addItem(tr("corrected amplitudes"));
    cmbFCCSCorrected->addItem(tr("explained amplitudes"));
    ggrcl->addRow(tr("rel. CCF display mode: "), cmbFCCSCorrected);

    spinCCFAmplitudeRangeMin=new QDoubleSpinBox(this);
    spinCCFAmplitudeRangeMin->setRange(0,1000000);
    spinCCFAmplitudeRangeMin->setValue(5);
    spinCCFAmplitudeRangeMin->setDecimals(1);
    spinCCFAmplitudeRangeMin->setSuffix(" microseconds");
    ggrcl->addRow(tr("amplitude range, min: "), spinCCFAmplitudeRangeMin);
    spinCCFAmplitudeRangeMax=new QDoubleSpinBox(this);
    spinCCFAmplitudeRangeMax->setRange(0,1000000);
    spinCCFAmplitudeRangeMax->setValue(30);
    spinCCFAmplitudeRangeMax->setDecimals(1);
    spinCCFAmplitudeRangeMax->setSuffix(" microseconds");
    ggrcl->addRow(tr("amplitude range, max: "), spinCCFAmplitudeRangeMax);

    spinCrosstalk=new QDoubleSpinBox(this);
    spinCrosstalk->setRange(0,1000);
    spinCrosstalk->setValue(0);
    spinCrosstalk->setDecimals(2);
    spinCrosstalk->setSuffix(" %");
    ggrcl->addRow(tr("G->R crosstalk: "), spinCrosstalk);

    labRelCCF=new QLabel(grpRelCCF);
    ggrcl->addRow(tr("Results, average: "), labRelCCF);
    labRelCCFSel=new QLabel(grpRelCCF);
    ggrcl->addRow(labRelCCFSelLab=new QLabel(tr("Results, run ?: ")), labRelCCFSel);


    gl->addWidget(grpRelCCF, 11,0,1,2);

    QWidget* wp=new QWidget(this);
    QVBoxLayout* lp=new QVBoxLayout();
    wp->setLayout(lp);
    plotter = new QFPlotter(true, this);
    plotter->get_plotter()->set_userSettigsFilename(ProgramOptions::getInstance()->getIniFilename());
    lp->addWidget(plotter);
    sliders=new DataCutSliders(this);
    connect(sliders, SIGNAL(slidersChanged(int , int , int, int)), this, SLOT(slidersChanged(int, int, int, int)));
    lp->addWidget(sliders);

    splitter->addWidget(wp);
    splitter->addWidget(w);
    splitter->setCollapsible(0, false);
    splitter->setCollapsible(1, false);
    splitter->setStretchFactor(0,5);
    splitter->setStretchFactor(1,1);

    actCopyNormalizedACF=new QFActionWithNoMenuRole(tr("copy normalized CFs to table"), this);
    connect(actCopyNormalizedACF, SIGNAL(triggered()), this, SLOT(copyNormalizedACFs()));
    actCorrectOffset=new QFActionWithNoMenuRole(tr("correct CFs for offset"), this);
    connect(actCorrectOffset, SIGNAL(triggered()), this, SLOT(correctOffset()));

    menuMask=propertyEditor->addMenu("&Selection/Mask", 0);
    correlationMaskTools->registerMaskToolsToMenu(menuMask);
    menuMask->addSeparator();
    correlationMaskTools->registerCorrelationToolsToMenu(menuMask);

    menuData=propertyEditor->addOrFindMenu(tr("&Data"), -1);
    //menuData->addAction(actCopyNormalizedACF);
    menuData->addAction(actCorrectOffset);


}