Exemplo n.º 1
0
caScriptButton::caScriptButton(QWidget *parent) : QWidget(parent)
{

    QGridLayout *l = new QGridLayout;
    l->setMargin(0);
    displayScript = new QCheckBox();
    displayScript->setText("");
    displayScript->setGeometry(0,0,15,15);
    displayScript->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    buttonScript = new EPushButton( "Action", this );
    buttonScript->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

    setFontScaleModeL(EPushButton::WidthAndHeight);

    l->addWidget(buttonScript, 0, 0);
    l->addWidget(displayScript, 0, 1);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

    setLayout(l);

    thisForeColor = Qt::black;
    thisBackColor = Qt::gray;

    thisShowExecution = false;

    connect(displayScript, SIGNAL(clicked()), this, SLOT(buttonToggled()) );
    connect(buttonScript, SIGNAL(clicked()), this, SLOT(scriptButtonClicked()) );

    installEventFilter(this);
    setAccessW(true);

    setElevation(on_top);

    setCheckboxDisplay(true);
}
Exemplo n.º 2
0
caChoice::caChoice(QWidget *parent) : QWidget(parent)
{
    numCells = 2;
    labels << "1" << "2" << "3" << "4" << "5" << "6" << "7" << "8" << "9" << "10" << "11" << "12" << "13" << "14" << "15" << "16";
    texts << "1" << "2" << "3" << "4" << "5" << "6" << "7" << "8" << "9" << "10" << "11" << "12" << "13" << "14" << "15" << "16";
    signalMapper = new QSignalMapper(this);

    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    grid = new QGridLayout(this);
    grid->setMargin(0);
    grid->setSpacing(2);

    thisStacking = Row;
    thisStartBit = 0;
    thisEndBit = 15;

    thisColorMode = Default;
    thisForeColor = QColor(0,0,0);
    thisBackColor = QColor(155,255,255);
    thisBorderColor = QColor(0,0,176);
    thisAlignment = center;
    thisScaleMode = EPushButton::WidthAndHeight;

    setAccessW(true);
    installEventFilter(this);

    populateCells(labels, -1);
    setColorMode(thisColorMode);

    setElevation(on_top);
}
Exemplo n.º 3
0
caScan2D::caScan2D(QWidget *parent) : QWidget(parent)
{
    m_init = true;

    m_widthDefined = false;
    m_heightDefined = false;

    m_xcptDefined = false;
    m_ycptDefined = false;
    m_xnewdataDefined = false;
    m_ynewdataDefined = false;
    m_savedata_pathDefined = false;
    m_savedata_subdirDefined = false;
    m_savedata_filenameDefined = false;

    thisSimpleView = false;
    savedSize = 0;
    savedWidth = 0;
    savedHeight = 0;
    selectionInProgress = false;

    savedData = (float*) 0;

    initWidgets();

    Xpos = Ypos = 0;

    scrollArea = (QScrollArea *) 0;

    mainLayout = new QGridLayout(this);
    mainLayout->setMargin(0);
    mainLayout->setSpacing(0);
    setLayout(mainLayout);
    setup();

    setColormap(spectrum_wavelength);
    setCustomMap("");
    setDiscreteCustomMap(false);
    
    setROIChannelsRead("");
    setROIChannelsWrite("");

    setROIreadType(none);
    setROIwriteType(none);

    setROIwritemarkerType(box);
    setROIreadmarkerType(box);
    
    setAccessW(true);
    installEventFilter(this);

    scaleFactor = 1.0;

    UpdatesPerSecond = 0;
    startTimer(1000);
    
    writeTimer = new QTimer(this);
    connect(writeTimer, SIGNAL(timeout()), this, SLOT(updateChannels()));   
}
Exemplo n.º 4
0
caTextEntry::caTextEntry(QWidget *parent) : caLineEdit(parent)
{
    connect(this, SIGNAL(returnPressed()), this, SLOT(dataInput()));
    clearFocus();
    setAccessW(true);
    installEventFilter(this);
    newFocusPolicy(Qt::ClickFocus);
}
Exemplo n.º 5
0
caMessageButton::caMessageButton(QWidget *parent) : EPushButton(parent)
{
    setAccessW(true);
    thisColorMode = Static;
    thisForeColor = Qt::black;
    thisDisabledForeColor = Qt::gray;
    setBackground(QColor(0xe8, 0xe8, 0xe8));
    installEventFilter(this);

    setElevation(on_top);
}
Exemplo n.º 6
0
caNumeric::caNumeric(QWidget *parent) : ENumeric(parent)
{
     setAccessW(true);
     setPrecisionMode(Channel);
     setLimitsMode(Channel);
     thisMaximum = 100000.0;
     thisMinimum = -100000.0;
     setDigitsFontScaleEnabled(true);
     setForeground(Qt::black);
     setBackground(QColor(230,230,230));
}
caApplyNumeric::caApplyNumeric(QWidget *parent) : EApplyNumeric(parent)
{
    setAccessW(true);
    setPrecisionMode(Channel);
    setLimitsMode(Channel);
    thisMaximum = 100000.0;
    thisMinimum = -100000.0;
    setDigitsFontScaleEnabled(true);
    setForeground(Qt::black);
    setBackground(QColor(230,230,230));
    thisFixedFormat = false;
    installEventFilter(this);
}
Exemplo n.º 8
0
caNumeric::caNumeric(QWidget *parent) : ENumeric(parent)
{
     setStyleSheet("");

     setAccessW(true);
     setPrecisionMode(Channel);
     setLimitsMode(Channel);
     setMaxValue(100000.0);
     setMinValue(-100000.0);
     thisFixedFormat = false;
     thisColorMode = Static;
     setDigitsFontScaleEnabled(true);
     setForeground(Qt::black);

     renewStyleSheet = true;
     setBackground(QColor(230,230,230));
     setElevation(on_top);
}
caToggleButton::caToggleButton(QWidget *parent) : QCheckBox(parent), FontScalingWidget(this)
{
    setCheckable(true);
    setTristate(true);
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

    thisPalette = palette();
    thisBackColor = defaultBackColor = QColor(200,200,200,0);
    thisForeColor = defaultForeColor = Qt::black;
    thisColorMode=Static;
    setBackground(defaultBackColor);
    setForeground(defaultForeColor);

    installEventFilter(this);
    connect(this, SIGNAL(clicked()), this, SLOT(buttonToggled()) );

    setTrueValue("1");
    setFalseValue("0");

    setAccessW(true);

    setFontScaleMode(WidthAndHeight);
}