示例#1
0
文件: xgui.cpp 项目: q5sys/pcbsd
void XGUI::ProgramInit()
{
    
    //gridLayout_4->setMargin(0);
    //gridLayout_4->setSpacing(0);
    
    // Load the screen resolutions
    loadResolutions();

    // Load the drivers
    loadDrivers();

    // Load the Depth
    loadDepth();

    // Load the Device Information
    loadDeviceInformation();
   
    // Disable the monitor advanced group box
    monitorChangedSlot();

    // Check for an unprobed monitor
    checkUnprobedMonitor(); 

    // Connect our Dual-head checkbox / slot
    connect(checkDualHead, SIGNAL( clicked() ), this, SLOT( dualChangedSlot() ) );
    connect(checkMonitorSync, SIGNAL( clicked() ), this, SLOT( monitorChangedSlot() ) );
    connect(pushApply, SIGNAL( clicked() ), this, SLOT( applySlot() ) );
    connect(pushClose, SIGNAL( clicked() ), this, SLOT( closeSlot() ) );

    // Check out dualChangedSlot to ensure we disable the box by default
    dualChangedSlot();
}
示例#2
0
ConfigForm::ConfigForm(int aCurrentIntervalValue, QWidget *parent,
		       const char *name,
		       bool modal, Qt::WFlags f)
  : QDialog( parent, name, modal, f ),
    mApplyButton(kNULL), mCancelButton(kNULL)
{
  mMinVal_Sec = float(kMIN_POLLING_INT) / 1000.f;
  mMaxVal_Sec = float(kMAX_POLLING_INT) / 1000.f;

  REG_DBGMSG1("ARPDBG: min val = ", mMinVal_Sec);
  REG_DBGMSG1("ARPDBG: max val = ", mMaxVal_Sec);

  REG_DBGCON("ConfigForm");

  // note aCurrentIntervalValue is in milliseconds - convert to
  // seconds for GUI entry

  this->setCaption( "Configure Polling" );
  resize( 150, 150 );

  // create the layouts for the form
  Q3VBoxLayout *lFormLayout = new Q3VBoxLayout(this, 10, 10, "configformlayout");
  Q3HBoxLayout *lButtonLayout = new Q3HBoxLayout(6, "configbuttonlayout");

  lFormLayout->addWidget(new QLabel("Enter interval value (seconds) \n"
				    "Valid range: "
				    +QString::number(mMinVal_Sec)
				    +" - "+QString::number(mMaxVal_Sec)
				    +" (2 d.p.)", this));

  mLineEdit = new QLineEdit( this );

  double lVal = (double) aCurrentIntervalValue/1000;

  mLineEdit->setText(QString::number(lVal, 'g', 3));
  mLineEdit->setValidator( new QDoubleValidator(mLineEdit, "dbleavlidator" ) );

  lFormLayout->addWidget( mLineEdit);

  mApplyButton = new QPushButton("Apply", this, "Applybutton"); \
  mApplyButton->setAutoDefault(FALSE);
  QToolTip::add(mApplyButton, "Apply to steerer");
  connect(mApplyButton, SIGNAL(clicked()), this, SLOT(applySlot()));

  mCancelButton = new QPushButton("Cancel", this, "cancelbutton");
  mCancelButton->setAutoDefault(FALSE);
  connect(mCancelButton,  SIGNAL(clicked()), this, SLOT( reject()));

  mCancelButton->setMinimumSize(mCancelButton->sizeHint());
  mCancelButton->setMaximumSize(mCancelButton->sizeHint());
  mApplyButton->setMinimumSize(mCancelButton->sizeHint());
  mApplyButton->setMaximumSize(mApplyButton->sizeHint());

  lButtonLayout->addWidget(mApplyButton);
  lButtonLayout->addWidget(mCancelButton);

  lFormLayout->addLayout(lButtonLayout);

}
示例#3
0
Setting::Setting(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::Setting)
{
    ui->setupUi(this);
    this->setWindowTitle("Settings");
    this->setMaximumSize(543,441);
    this->setMinimumSize(543,441);
    readTxt();
    connect(ui->applyButton,SIGNAL(clicked()),this,SLOT(applySlot()));
    connect(ui->okButton,SIGNAL(clicked()),this,SLOT(okSlot()));
}
示例#4
0
EditToolBar::EditToolBar(QWidget *parent) :
    QDialog(parent)
{
    //configure u
    ui.setupUi(this);

    //no search made yet
    searchMade = false;

    //icons size - copied from kedittoolbar class, in kdelibs
    iconSize = this->style()->pixelMetric(QStyle::PM_SmallIconSize);

    //separator item
    separatorItem = new QListWidgetItem(QString("--- %1 ---").arg(tr("Separator")));
    separatorItem->setData(32, "_separator");

    //setup icons
    ui.okButton->setIcon(QIcon::fromTheme("dialog-ok"));
    ui.applyButton->setIcon(QIcon::fromTheme("dialog-ok-apply"));
    ui.cancelButton->setIcon(QIcon::fromTheme("dialog-cancel"));
    ui.clearButton1->setIcon(QIcon::fromTheme("edit-clear-locationbar-rtl"));
    ui.clearButton2->setIcon(QIcon::fromTheme("edit-clear-locationbar-rtl"));
    ui.addButton->setIcon(QIcon::fromTheme("go-next"));
    ui.removeButton->setIcon(QIcon::fromTheme("go-previous"));
    ui.moveDownButton->setIcon(QIcon::fromTheme("go-down"));
    ui.moveUpButton->setIcon(QIcon::fromTheme("go-up"));
    ui.setDefaultsButton->setIcon(QIcon::fromTheme("document-revert"));

    //connections
    connect(this, SIGNAL(actionsListChanged()), this, SLOT(updateButtons()));
    connect(ui.currentActions, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));
    connect(ui.availableActions, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));
    connect(this, SIGNAL(actionsListChanged()), this, SLOT(actionsChangedSlot()));
    connect(ui.okButton, SIGNAL(clicked()), this, SLOT(okSlot()));
    connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applySlot()));
    connect(ui.addButton, SIGNAL(clicked()), this, SLOT(addAction()));
    connect(ui.removeButton, SIGNAL(clicked()), this, SLOT(removeAction()));
    connect(ui.moveDownButton, SIGNAL(clicked()), this, SLOT(moveDownAction()));
    connect(ui.moveUpButton, SIGNAL(clicked()), this, SLOT(moveUpAction()));
    connect(ui.currentFilter, SIGNAL(textChanged(QString)), this, SLOT(searchInCurrentActionsSlot(QString)));
    connect(ui.availableFilter, SIGNAL(textChanged(QString)), this, SLOT(searchInAvailableActionsSlot(QString)));
    connect(ui.setDefaultsButton, SIGNAL(clicked()), this, SLOT(setDefaults()));

    this->setWindowTitle(tr("Configure toolbar"));
}
示例#5
0
EditToolBar::EditToolBar(QWidget *parent) :
    QDialog(parent)
{
    ui.setupUi(this);
    ui.okButton->setIcon(QIcon::fromTheme("dialog-ok"));
    ui.applyButton->setIcon(QIcon::fromTheme("dialog-ok-apply"));
    ui.cancelButton->setIcon(QIcon::fromTheme("dialog-cancel"));

    tbe = new ToolBarEdit(this);
    tbe->setMaximumWidth(ui.widget->maximumWidth());
    tbe->setMaximumHeight(ui.widget->maximumHeight());

    connect(tbe, SIGNAL(actionsListChanged()), this, SLOT(actionsChangedSlot()));
    connect(ui.okButton, SIGNAL(clicked()), this, SLOT(okSlot()));
    connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applySlot()));

    ui.widget = tbe;

    this->setWindowTitle(tr("Configure toolbar"));
}