当前位置: 首页>>代码示例>>C++>>正文


C++ dateChanged函数代码示例

本文整理汇总了C++中dateChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ dateChanged函数的具体用法?C++ dateChanged怎么用?C++ dateChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dateChanged函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QLabel

void ClinicChargeStatisticForm::create()
{
    m_nameLabel = new QLabel(strNameLabel);
    m_nameEdit = new QLineEdit;
    connect(m_nameEdit, SIGNAL(textChanged(QString)), this, SLOT(updateTable()));

    m_genderLabel = new QLabel(strGenderLabel);
    m_genderComboBox = new QComboBox;
    connect(m_genderComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTable()));

    m_startDateLabel = new QLabel(strStartDateLabel);
    m_startDateEdit = new QDateEdit;
    m_startDateEdit->setCalendarPopup(true);
    m_startDateEdit->setMaximumDate(QDate::currentDate());
    connect(m_startDateEdit, SIGNAL(dateChanged(QDate)), this, SLOT(updateTable()));

    m_endDateLabel = new QLabel(strEndDateLabel);
    m_endDateEdit = new QDateEdit;
    m_endDateEdit->setCalendarPopup(true);
    m_endDateEdit->setMaximumDate(QDate::currentDate());
    connect(m_endDateEdit, SIGNAL(dateChanged(QDate)), this, SLOT(updateTable()));

    m_resultsView = new QTableView;
    m_resultsModel = new QStandardItemModel;
    m_resultsView->setModel(m_resultsModel);
    m_resultsView->setSelectionBehavior(QAbstractItemView::SelectRows);
    m_resultsView->setEditTriggers(QAbstractItemView::NoEditTriggers);
}
开发者ID:xuebeibei,项目名称:HIS,代码行数:28,代码来源:clinicchargestatisticform.cpp

示例2: QFrame

QWidget *TransactionView::createDateRangeWidget()
{
    dateRangeWidget = new QFrame();
    dateRangeWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
    dateRangeWidget->setContentsMargins(1,1,1,1);
    QHBoxLayout *layout = new QHBoxLayout(dateRangeWidget);
    layout->setContentsMargins(0,0,0,0);
    layout->addSpacing(23);
    layout->addWidget(new QLabel(tr("Range:")));

    dateFrom = new QDateTimeEdit(this);
    dateFrom->setDisplayFormat("dd/MM/yy");
    dateFrom->setCalendarPopup(true);
    dateFrom->setMinimumWidth(100);
    dateFrom->setDate(QDate::currentDate().addDays(-7));
    layout->addWidget(dateFrom);
    layout->addWidget(new QLabel(tr("to")));

    dateTo = new QDateTimeEdit(this);
    dateTo->setDisplayFormat("dd/MM/yy");
    dateTo->setCalendarPopup(true);
    dateTo->setMinimumWidth(100);
    dateTo->setDate(QDate::currentDate());
    layout->addWidget(dateTo);
    layout->addStretch();

    // Hide by default
    dateRangeWidget->setVisible(false);

    // Notify on change
    connect(dateFrom, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged()));
    connect(dateTo, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged()));

    return dateRangeWidget;
}
开发者ID:CassTheKid,项目名称:Guardian,代码行数:35,代码来源:transactionview.cpp

示例3: QMainWindow

GUI::MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    ui->date_from->setDate(QDate::currentDate().addMonths(-1));
    ui->date_to->setDate(QDate::currentDate());
    household = new logic::Household();
    QString ColumnName[] = {"Reason", "Comment", "Date", "Category", "Payment_Method", "Value"};
    ui->tbl_Overview->setColumnCount(6);
    ui->tbl_Overview->setRowCount(0);
    ui->tbl_Overview->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
    for(int i = 0; i < 6; i++)
        {
            ui->tbl_Overview->setHorizontalHeaderItem(i, new QTableWidgetItem(ColumnName[i]));
        }

    QStringList list=(QStringList()<<"10"<<"20"<<"50");
    ui->cmb_DataCount->addItems(list);
    refreshui();

    connect(ui->cmb_Cat, SIGNAL(currentIndexChanged(int)), this, SLOT(slotFilter()));
    connect(ui->cmb_DataCount, SIGNAL(currentIndexChanged(int)), this, SLOT(slotFilter()));
    connect(ui->date_from, SIGNAL(dateChanged(QDate)), this, SLOT(slotFilter()));
    connect(ui->date_to, SIGNAL(dateChanged(QDate)), this, SLOT(slotFilter()));
}
开发者ID:sandroKa,项目名称:SE,代码行数:26,代码来源:mainwindow.cpp

示例4: EffectiveDateWizardPageDecl

EffectiveDateWizardPage::EffectiveDateWizardPage(QWidget *parent)
    : EffectiveDateWizardPageDecl(parent)
{
  // Register the fields with the QWizard and connect the
  // appropriate signals to update the "Next" button correctly
  registerField("effectiveChangeDateEdit", m_effectiveChangeDateEdit, "date", SIGNAL(dateChanged(QDate)));
  connect(m_effectiveChangeDateEdit, SIGNAL(dateChanged(QDate)), this, SIGNAL(completeChanged()));
}
开发者ID:KDE,项目名称:kmymoney,代码行数:8,代码来源:effectivedatewizardpage.cpp

示例5: setDate

void AnnotationDialog::KDateEdit::dateEntered(QDate newDate)
{
    if ((mHandleInvalid || newDate.isValid()) && validate(newDate)) {
        setDate(newDate);
        emit dateChanged(newDate);
        emit dateChanged( DB::ImageDate( QDateTime(newDate), QDateTime(newDate) ) );
    }
}
开发者ID:astifter,项目名称:kphotoalbum-astifter-branch,代码行数:8,代码来源:KDateEdit.cpp

示例6: QDialog

EventEditor::EventEditor( const Event& event, QWidget* parent )
    : QDialog( parent )
    , m_ui( new Ui::EventEditor )
    , m_event( event )
{
    m_ui->setupUi( this );
    m_ui->dateEditEnd->calendarWidget()->setFirstDayOfWeek( Qt::Monday );
    m_ui->dateEditEnd->calendarWidget()->setVerticalHeaderFormat( QCalendarWidget::ISOWeekNumbers );
    m_ui->dateEditStart->calendarWidget()->setFirstDayOfWeek( Qt::Monday );
    m_ui->dateEditStart->calendarWidget()->setVerticalHeaderFormat( QCalendarWidget::ISOWeekNumbers );

    // Ctrl+Return for OK
    m_ui->buttonBox->button(QDialogButtonBox::Ok)->setShortcut(Qt::CTRL + Qt::Key_Return);

    // connect stuff:
    connect( m_ui->spinBoxHours, SIGNAL(valueChanged(int)),
             SLOT(durationHoursEdited(int)) );
    connect( m_ui->spinBoxMinutes, SIGNAL(valueChanged(int)),
             SLOT(durationMinutesEdited(int)) );
    connect( m_ui->dateEditStart, SIGNAL(dateChanged(QDate)),
             SLOT(startDateChanged(QDate)) );
    connect( m_ui->timeEditStart, SIGNAL(timeChanged(QTime)),
             SLOT(startTimeChanged(QTime)) );
    connect( m_ui->dateEditEnd, SIGNAL(dateChanged(QDate)),
             SLOT(endDateChanged(QDate)) );
    connect( m_ui->timeEditEnd, SIGNAL(timeChanged(QTime)),
             SLOT(endTimeChanged(QTime)) );
    connect( m_ui->pushButtonSelectTask, SIGNAL(clicked()),
             SLOT(selectTaskClicked()) );
    connect( m_ui->textEditComment, SIGNAL(textChanged()),
             SLOT(commentChanged()) );
    connect( m_ui->startToNowButton, SIGNAL(clicked()),
             SLOT(startToNowButtonClicked()) );
    connect( m_ui->endToNowButton, SIGNAL(clicked()),
             SLOT(endToNowButtonClicked()) );
    // what a fricking hack - but QDateTimeEdit does not seem to have
    // a simple function to toggle 12h and 24h mode:
    // yeah, I know, this will survive changes in the user prefs, but
    // only for this instance of the edit dialog
    QString originalDateTimeFormat = m_ui->timeEditStart->displayFormat();

    QString format = originalDateTimeFormat
                     .remove( QStringLiteral("ap") )
                     .remove( QStringLiteral("AP") )
                     .simplified();
    m_ui->timeEditStart->setDisplayFormat( format );
    m_ui->timeEditEnd->setDisplayFormat( format );

    // initialize to some sensible values, unless we got something valid passed in
    if ( !m_event.isValid() ) {
        QSettings settings;
        QDateTime start = settings.value( MetaKey_LastEventEditorDateTime, QDateTime::currentDateTime() ).toDateTime();
        m_event.setStartDateTime( start );
        m_event.setEndDateTime( start );
        m_endDateChanged = false;
    }
    updateValues( true );
}
开发者ID:sebsauer,项目名称:Charm,代码行数:58,代码来源:EventEditor.cpp

示例7: QGroupBox

//! [13]
void Window::createDatesGroupBox()
{
    datesGroupBox = new QGroupBox(tr("Dates"));

    minimumDateEdit = new QDateEdit;
    minimumDateEdit->setDisplayFormat("MMM d yyyy");
    minimumDateEdit->setDateRange(calendar->minimumDate(),
                                  calendar->maximumDate());
    minimumDateEdit->setDate(calendar->minimumDate());

    minimumDateLabel = new QLabel(tr("&Minimum Date:"));
    minimumDateLabel->setBuddy(minimumDateEdit);

    currentDateEdit = new QDateEdit;
    currentDateEdit->setDisplayFormat("MMM d yyyy");
    currentDateEdit->setDate(calendar->selectedDate());
    currentDateEdit->setDateRange(calendar->minimumDate(),
                                  calendar->maximumDate());

    currentDateLabel = new QLabel(tr("&Current Date:"));
    currentDateLabel->setBuddy(currentDateEdit);

    maximumDateEdit = new QDateEdit;
    maximumDateEdit->setDisplayFormat("MMM d yyyy");
    maximumDateEdit->setDateRange(calendar->minimumDate(),
                                  calendar->maximumDate());
    maximumDateEdit->setDate(calendar->maximumDate());

    maximumDateLabel = new QLabel(tr("Ma&ximum Date:"));
    maximumDateLabel->setBuddy(maximumDateEdit);

//! [13] //! [14]
    connect(currentDateEdit, SIGNAL(dateChanged(QDate)),
            calendar, SLOT(setSelectedDate(QDate)));
    connect(calendar, SIGNAL(selectionChanged()),
            this, SLOT(selectedDateChanged()));
    connect(minimumDateEdit, SIGNAL(dateChanged(QDate)),
            this, SLOT(minimumDateChanged(QDate)));
    connect(maximumDateEdit, SIGNAL(dateChanged(QDate)),
            this, SLOT(maximumDateChanged(QDate)));

//! [14]
    QGridLayout *dateBoxLayout = new QGridLayout;
    dateBoxLayout->addWidget(currentDateLabel, 1, 0);
    dateBoxLayout->addWidget(currentDateEdit, 1, 1);
    dateBoxLayout->addWidget(minimumDateLabel, 0, 0);
    dateBoxLayout->addWidget(minimumDateEdit, 0, 1);
    dateBoxLayout->addWidget(maximumDateLabel, 2, 0);
    dateBoxLayout->addWidget(maximumDateEdit, 2, 1);
    dateBoxLayout->setRowStretch(3, 1);

    datesGroupBox->setLayout(dateBoxLayout);
//! [15]
}
开发者ID:Nacto1,项目名称:qt-everywhere-opensource-src-4.6.2,代码行数:55,代码来源:window.cpp

示例8: toToolWidget

toAWR::toAWR(/*toTool *tool,*/ QWidget *parent, toConnection &_connection)
    : toToolWidget(AWRTool, "simplequery.html", parent, _connection, "toAWR")
{
    QToolBar *toolbar = Utils::toAllocBar(this, tr("AWR Tool"));
    layout()->addWidget(toolbar);

    toolbar->addWidget(new QLabel("Inst:", toolbar));
    dbid = new toResultCombo(toolbar, "AWR toolbar");
    dbid->setSQL(toSQL::sql("toAWR:DBInstances", connection()));
    fsnap = new toResultCombo(toolbar, "AWR toolbar");
    fsnap->setSelectionPolicy(toResultCombo::LastButOne);
    fsnap->setSQL(SQLSnaps);
    tsnap = new toResultCombo(toolbar, "AWR toolbar");
    tsnap->setSelectionPolicy(toResultCombo::Last);
    tsnap->setSQL(SQLSnaps);

    startdate = new QDateTimeEdit(QDate::currentDate());
    startdate->setCalendarPopup(true);
    enddate = new QDateTimeEdit(QDate::currentDate());
    enddate->setCalendarPopup(true);

    connect(dbid, SIGNAL(activated(int)), this, SLOT(instanceChanged(int)));
    connect(dbid, SIGNAL(done()), this, SLOT(instanceRead()));
    connect(startdate, SIGNAL(dateChanged(QDate)), this, SLOT(startDateChanged(QDate)));
    connect(enddate, SIGNAL(dateChanged(QDate)), this, SLOT(endDateChanged(QDate)));

    toolbar->addWidget(dbid);
    toolbar->addWidget(startdate);
    toolbar->addWidget(fsnap);
    toolbar->addWidget(enddate);
    toolbar->addWidget(tsnap);

    try
    {
        dbid->refresh();
    }
    TOCATCH;

    toolbar->addAction(QIcon(QPixmap(const_cast<const char**>(execute_xpm))),
                       tr("Generate report"),
                       this,
                       SLOT(execute()));
    toolbar->addWidget(new Utils::toSpacer());

    QAction *executeAct = new QAction(QPixmap(execute_xpm), tr("Execute_ current statement"), this);
    executeAct->setShortcut(QKeySequence::Refresh);
    connect(executeAct, SIGNAL(triggered()), this, SLOT(refresh(void)));

    new toChangeConnection(toolbar);

    Tabs = new QTabWidget(this);
    layout()->addWidget(Tabs);
}
开发者ID:doniexun,项目名称:tora,代码行数:53,代码来源:toawr.cpp

示例9: SLM_TRACE_FUNC

void SQueryEditor::stopping()
{
    SLM_TRACE_FUNC();

    // Disconnect the signals
    QObject::disconnect(m_patientNameLineEdit, SIGNAL(returnPressed()), this, SLOT(queryPatientName()));
    QObject::disconnect(m_patientNameQueryButton, SIGNAL(clicked()), this, SLOT(queryPatientName()));
    QObject::disconnect(m_studyDateQueryButton, SIGNAL(clicked()), this, SLOT(queryStudyDate()));
    QObject::disconnect(m_beginStudyDateEdit, SIGNAL(dateChanged(QDate)), this, SLOT(queryStudyDate()));
    QObject::disconnect(m_endStudyDateEdit, SIGNAL(dateChanged(QDate)), this, SLOT(queryStudyDate()));

    this->destroy();
}
开发者ID:fw4spl-org,项目名称:fw4spl,代码行数:13,代码来源:SQueryEditor.cpp

示例10: ReportDialogView

TopGoodsDialogView::TopGoodsDialogView(QWidget *parent, TopGoodsDialogController *controller)
    : ReportDialogView(parent)
{
    this->controller = controller;
    this->setWindowTitle("Najlepiej sprzedające się towary");

    this->addComponents();

    connect(buttonBox, SIGNAL(accepted()), controller, SLOT(saveReport()));
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
    connect(spinBoxListLimit, SIGNAL(valueChanged(int)), controller, SLOT(setListLimitFilter(int)));
    connect(dateEditFrom, SIGNAL(dateChanged(QDate)), controller, SLOT(setDateFromFilter(QDate)));
    connect(dateEditTo, SIGNAL(dateChanged(QDate)), controller, SLOT(setDateToFilter(QDate)));
}
开发者ID:milczarekIT,项目名称:agila,代码行数:14,代码来源:TopGoodsDialogView.cpp

示例11: QToolBar

void QWidgetBusinessTrip::doToolBar()
{
    toolBar_ = new QToolBar(this);

    QList<QAction*> listActions;

    QAction *act;
    act = new QAction(this);
    act->setIcon(QIcon(":/CTRL/refresh"));
    act->setToolTip("Обновить");
    listActions.push_back(act);
    connect(act, SIGNAL(triggered(bool)), SLOT(slotRefresh()));

    toolBar_->addActions(listActions);

    QWidget *widget;
    QDateEdit *dateEdit;
    widget = new QWidget(toolBar_);
    widget->setLayout(new QVBoxLayout());
    widget->layout()->addWidget(new QLabel("Дата с"));
    dateEdit = new QDateEdit(this);
    dateEdit->setCalendarPopup(true);
    dateEdit->setDate(dateStart_);
    connect(dateEdit, SIGNAL(dateChanged(QDate)), SLOT(slotChangeDateStart(QDate)));
    widget->layout()->addWidget(dateEdit);
    toolBar_->addWidget(widget);

    widget = new QWidget(toolBar_);
    widget->setLayout(new QVBoxLayout());
    widget->layout()->addWidget(new QLabel("Дата по"));
    dateEdit = new QDateEdit(this);
    dateEdit->setCalendarPopup(true);
    dateEdit->setDate(dateEnd_);
    connect(dateEdit, SIGNAL(dateChanged(QDate)), SLOT(slotChangeDateEnd(QDate)));
    widget->layout()->addWidget(dateEdit);
    toolBar_->addWidget(widget);

    widget = new QWidget(toolBar_);
    widget->setLayout(new QVBoxLayout());
    widget->layout()->addWidget(new QLabel("Сотрудник"));
    editEmployee_ = new QLineEdit(toolBar_);
    connect(editEmployee_, SIGNAL(editingFinished()), SLOT(slotRefresh()));
    widget->layout()->addWidget(editEmployee_);
    toolBar_->addWidget(widget);

    toolBar_->setIconSize(QSize(40,40));
    layout_->addWidget(toolBar_);
}
开发者ID:4ynyky,项目名称:CRM,代码行数:48,代码来源:QWidgetBusinessTrip.cpp

示例12: QDialog

DAgregarGarantia::DAgregarGarantia( QWidget *parent ) :
    QDialog( parent ), _proxima_garantia( this, -1, -1 )
{
    setupUi(this);
    setWindowTitle( QString::fromUtf8( "Agegar nueva garantía" ) );
    setWindowIcon( QIcon( ":/imagenes/garantia_agregar.png" ) );

    _id_cliente = -1;
    _id_comprobante = -1;
    _id_producto = -1;
    _nombre_producto = QString();

    connect( CBCliente, SIGNAL( cambioIdCliente( int ) ), this, SLOT( buscarEquipamientos( int ) ) );
    connect( CBEquipamiento, SIGNAL( cambioId( int ) ), this, SLOT( buscarFactura( int ) ) );

    connect( DECompra, SIGNAL( dateChanged( QDate ) ), this, SLOT( actualizarFechaFinGarantia( QDate ) ) );
    DECompra->setDate( QDate::currentDate() );

    CkBImprimir->setChecked( true );
    CkBAvisarEmail->setEnabled( false ); /// @TODO: Habilitar esto cuando se genere el sistema de alertas automaticas

    LECodigoGarantia->setReadOnly( true );
    LECodigoGarantia->setText( MGarantias::obtenerProximoComprobante().aCadena() );

    this->adjustSize();
}
开发者ID:chungote,项目名称:gestotux,代码行数:26,代码来源:dagregargarantia.cpp

示例13: dateChanged

void CheckableEditableDate::buttonPressed()
{
    if (m_editMode) {
        emit dateChanged(KDateTime(m_dateTimeWidget->date()));
    }
    EditableDate::buttonPressed();
}
开发者ID:sandsmark,项目名称:zanshin,代码行数:7,代码来源:editablewidget.cpp

示例14: QWidget

LogViewer::LogViewer(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::LogViewer)
{
    ui->setupUi(this);
    Tp::registerTypes();
    g_type_init();
    QGlib::init(); //are these 4 really needed?
    Tpl::init();

    m_accountManager = Tp::AccountManager::create();

    m_entityModel = new EntityModel(this);
    m_filterModel = new QSortFilterProxyModel(this);
    m_filterModel->setSourceModel(m_entityModel);

    ui->entityList->setModel(m_filterModel);
    ui->entityFilter->setProxy(m_filterModel);

    //TODO parse command line args and update all views as appropriate

    connect(m_accountManager->becomeReady(), SIGNAL(finished(Tp::PendingOperation*)), SLOT(onAccountManagerReady()));
    connect(ui->entityList, SIGNAL(activated(QModelIndex)), SLOT(onEntitySelected(QModelIndex)));
    connect(ui->datePicker, SIGNAL(dateChanged(QDate)), SLOT(onDateSelected()));
}
开发者ID:R4md4c,项目名称:ktp-text-ui,代码行数:25,代码来源:log-viewer.cpp

示例15: QWidget

DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f)
{
	ui.setupUi(this);
	ui.dateEdit->setDisplayFormat(getDateFormat());
	ui.tableWidget->setTitle(tr("Dive planner points"));
	ui.tableWidget->setModel(DivePlannerPointsModel::instance());
	DivePlannerPointsModel::instance()->setRecalc(true);
	ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::GAS, new AirTypesDelegate(this));
	ui.cylinderTableWidget->setTitle(tr("Available gases"));
	ui.cylinderTableWidget->setModel(CylindersModel::instance());
	QTableView *view = ui.cylinderTableWidget->view();
	view->setColumnHidden(CylindersModel::START, true);
	view->setColumnHidden(CylindersModel::END, true);
	view->setColumnHidden(CylindersModel::DEPTH, false);
	view->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate(this));
	connect(ui.cylinderTableWidget, SIGNAL(addButtonClicked()), DivePlannerPointsModel::instance(), SLOT(addCylinder_clicked()));
	connect(ui.tableWidget, SIGNAL(addButtonClicked()), DivePlannerPointsModel::instance(), SLOT(addStop()));

	connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)),
		GasSelectionModel::instance(), SLOT(repopulate()));
	connect(CylindersModel::instance(), SIGNAL(rowsInserted(QModelIndex, int, int)),
		GasSelectionModel::instance(), SLOT(repopulate()));
	connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)),
		GasSelectionModel::instance(), SLOT(repopulate()));
	connect(CylindersModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)),
		plannerModel, SIGNAL(cylinderModelEdited()));
	connect(CylindersModel::instance(), SIGNAL(rowsInserted(QModelIndex, int, int)),
		plannerModel, SIGNAL(cylinderModelEdited()));
	connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)),
		plannerModel, SIGNAL(cylinderModelEdited()));

	ui.tableWidget->setBtnToolTip(tr("Add dive data point"));
	connect(ui.startTime, SIGNAL(timeChanged(QTime)), plannerModel, SLOT(setStartTime(QTime)));
	connect(ui.dateEdit, SIGNAL(dateChanged(QDate)), plannerModel, SLOT(setStartDate(QDate)));
	connect(ui.ATMPressure, SIGNAL(valueChanged(int)), this, SLOT(atmPressureChanged(int)));
	connect(ui.atmHeight, SIGNAL(valueChanged(int)), this, SLOT(heightChanged(int)));
	connect(ui.salinity, SIGNAL(valueChanged(double)), this, SLOT(salinityChanged(double)));
	connect(DivePlannerPointsModel::instance(), SIGNAL(startTimeChanged(QDateTime)), this, SLOT(setupStartTime(QDateTime)));

	// Creating (and canceling) the plan
	replanButton = ui.buttonBox->addButton(tr("Save new"), QDialogButtonBox::ActionRole);
	connect(replanButton, SIGNAL(clicked()), plannerModel, SLOT(saveDuplicatePlan()));
	connect(ui.buttonBox, SIGNAL(accepted()), plannerModel, SLOT(savePlan()));
	connect(ui.buttonBox, SIGNAL(rejected()), plannerModel, SLOT(cancelPlan()));
	QShortcut *closeKey = new QShortcut(QKeySequence(Qt::Key_Escape), this);
	connect(closeKey, SIGNAL(activated()), plannerModel, SLOT(cancelPlan()));

	// This makes shure the spinbox gets a setMinimum(0) on it so we can't have negative time or depth.
	ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::DEPTH, new SpinBoxDelegate(0, INT_MAX, 1, this));
	ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::RUNTIME, new SpinBoxDelegate(0, INT_MAX, 1, this));
	ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::DURATION, new SpinBoxDelegate(0, INT_MAX, 1, this));
	ui.tableWidget->view()->setItemDelegateForColumn(DivePlannerPointsModel::CCSETPOINT, new DoubleSpinBoxDelegate(0, 2, 0.1, this));

	/* set defaults. */
	ui.ATMPressure->setValue(1013);
	ui.atmHeight->setValue(0);

	setMinimumWidth(0);
	setMinimumHeight(0);
}
开发者ID:miniron,项目名称:subsurface,代码行数:60,代码来源:diveplanner.cpp


注:本文中的dateChanged函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。