您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wxDateTime函数代码示例

51自学网 2021-06-03 10:09:08
  C++
这篇教程C++ wxDateTime函数代码示例写得很实用,希望能帮到您。

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

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

示例1: mmDateRange

mmLast12Months::mmLast12Months(): mmDateRange(){    this->end_date_ = wxDateTime(this->start_date_).GetLastMonthDay();    this->start_date_ = wxDateTime(end_date_).SetDay(1)        .Add(wxDateSpan::Months(1))        .Subtract(wxDateSpan::Years(1));    this->title_ = wxTRANSLATE("Last 12 Months");}
开发者ID:Zorg2409,项目名称:moneymanagerex,代码行数:9,


示例2: wxQtConvertDate

wxDateTime wxQtConvertDate(const QDate& date){    if ( !date.isNull() )        return wxDateTime(date.day(),            static_cast<wxDateTime::Month>(date.month() - 1),            date.year(), 0, 0, 0, 0);    else        return wxDateTime();}
开发者ID:EEmmanuel7,项目名称:wxWidgets,代码行数:9,


示例3: f

void GRIBUIDialog::OpenFile(bool newestFile){    m_bpPlay->SetBitmap(*m_bPlay);    m_bpPlay->SetToolTip(_("Play"));    m_tPlayStop.Stop();    m_cRecordForecast->Clear();    /* this should be un-commented to avoid a memory leak,       but for some reason it crbashes windows *///    delete m_bGRIBActiveFile;    m_pTimelineSet = NULL;    //get more recent file in default directory if necessary    wxFileName f( m_file_name );    if( newestFile || f.GetFullName().IsEmpty() ) m_file_name = GetNewestFileInDirectory();    m_bGRIBActiveFile = new GRIBFile( m_file_name,                                      pPlugIn->GetCopyFirstCumRec(),                                      pPlugIn->GetCopyMissWaveRec() );        ArrayOfGribRecordSets *rsa = m_bGRIBActiveFile->GetRecordSetArrayPtr();    if(rsa->GetCount() < 2)        m_TimeLineHours = 0;    else {        GribRecordSet &first=rsa->Item(0), &last = rsa->Item(rsa->GetCount()-1);                wxTimeSpan span = wxDateTime(last.m_Reference_Time) - wxDateTime(first.m_Reference_Time);        m_TimeLineHours = span.GetHours();        m_sTimeline->Enable();    }    m_sTimeline->SetValue(0);        wxFileName fn( m_file_name );    SetLabel( fn.GetFullName() );    if( m_bGRIBActiveFile ) {        if( m_bGRIBActiveFile->IsOK() ) {             //there could be valid but empty file            if( rsa->GetCount() == 0 ) {                m_bGRIBActiveFile = NULL;                pPlugIn->GetGRIBOverlayFactory()->SetMessage( _("Error:  No valid data in this file!") );            } else                PopulateComboDataList( 0 );        } else {            if( fn.IsDir() ) {                pPlugIn->GetGRIBOverlayFactory()->SetMessage( _("Warning:  Empty directory!") );                SetLabel( fn.GetFullPath() );            }            else                pPlugIn->GetGRIBOverlayFactory()->SetMessage( m_bGRIBActiveFile->GetLastMessage() );	}        SetFactoryOptions();        DisplayDataGRS();        PopulateTrackingControls();    }}
开发者ID:bingcheng,项目名称:OpenCPN,代码行数:56,


示例4: dlg

void udfPaymentHistory::OnUpdate( wxCommandEvent& event ){    do    {        unsigned int nItem = m_listPayments->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);        if(-1 == nItem)            break;        unsigned int nId = *(int*)m_listPayments->GetItemData(nItem);        CPaymentHistoryTable::tTableIt it = m_payments.find(nId);        if(it == m_payments.end())            break;        CPaymentHistoryTable::tDATA& data = it->second;        udfPayment	dlg(this);        dlg.SetPayDate(data.payDate);        dlg.SetExpDate(data.expDate);        if (data.sum == -1.0)            dlg.SetFreeCheck(true);        else            dlg.SetSum(data.sum);        // fill dialog fields        if(dlg.ShowModal() == wxID_OK)        {            data.payDate = dlg.GetPayDate().GetTicks();            data.expDate = dlg.GetExpDate().GetTicks();            if(dlg.GetFreeCheck())                data.sum = -1.0;            else                data.sum = dlg.GetSum();            if(UDF_OK != CPaymentHistoryTable(m_pCon).UpdateRow(nId, data))                break;            int nCol = 1;            wxListItem info;            info.SetId(nItem);            info.SetText(wxDateTime(data.payDate).Format(STR_FORMAT_DATE));            m_listPayments->SetItem(info);            info.SetColumn(nCol++);            info.SetText(wxDateTime(data.expDate).Format(STR_FORMAT_DATE));            m_listPayments->SetItem(info);            info.SetColumn(nCol++);            if (data.sum == -1.0)                info.SetText(STR_FREE);            else                info.SetText(wxString::Format(STR_FORMAT_SUM, data.sum));            m_listPayments->SetItem(info);        }    } while(0);}
开发者ID:AndrianDTR,项目名称:udf,代码行数:54,


示例5: wxBoxSizer

void PanelOptionsParameters::CreateControls(){    ////@begin PanelOptionsParameters content construction    PanelOptionsParameters* itemPanel1 = this;    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);    itemPanel1->SetSizer(itemBoxSizer2);    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);    itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_RIGHT|wxALL, 5);    wxStaticText* itemStaticText4 = new wxStaticText( itemPanel1, ID_LBL_Underlying, _("Underlying:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );    itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);    m_txtUnderlying = new wxTextCtrl( itemPanel1, ID_TXT_Underlying, _("GLD"), wxDefaultPosition, wxDefaultSize, 0 );    m_txtUnderlying->SetMaxLength(10);    itemBoxSizer3->Add(m_txtUnderlying, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);    wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL);    itemBoxSizer2->Add(itemBoxSizer6, 0, wxALIGN_RIGHT|wxALL, 5);    wxStaticText* itemStaticText7 = new wxStaticText( itemPanel1, ID_LBL_OPTIONNEARDATE, _("Near Date:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );    itemBoxSizer6->Add(itemStaticText7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);    m_ctrlNearDate = new wxDatePickerCtrl( itemPanel1, ID_DATE_NearDate, wxDateTime(), wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT );    itemBoxSizer6->Add(m_ctrlNearDate, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);    wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxHORIZONTAL);    itemBoxSizer2->Add(itemBoxSizer9, 0, wxALIGN_RIGHT|wxALL, 5);    wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, ID_LBL_OPTIONFARDATE, _("Far Date:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );    itemBoxSizer9->Add(itemStaticText10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);    m_ctrlFarDate = new wxDatePickerCtrl( itemPanel1, ID_DATE_FarDate, wxDateTime(), wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT );    itemBoxSizer9->Add(m_ctrlFarDate, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);    wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxHORIZONTAL);    itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);    m_btnStart = new wxButton( itemPanel1, ID_BTN_START, _("Start"), wxDefaultPosition, wxDefaultSize, 0 );    itemBoxSizer12->Add(m_btnStart, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);    m_btnStop = new wxButton( itemPanel1, ID_BTN_STOP, _("Stop"), wxDefaultPosition, wxDefaultSize, 0 );    m_btnStop->Enable(false);    itemBoxSizer12->Add(m_btnStop, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);    wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxHORIZONTAL);    itemBoxSizer2->Add(itemBoxSizer15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);    m_btnSave = new wxButton( itemPanel1, ID_BTN_SAVE, _("Save"), wxDefaultPosition, wxDefaultSize, 0 );    itemBoxSizer15->Add(m_btnSave, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);////@end PanelOptionsParameters content construction}
开发者ID:rburkholder,项目名称:trade-frame,代码行数:54,


示例6: wxDateTime

void CGarbageCollector::RecycleTaskInstances(){    BSLERRCODE rc;    std::vector<CTaskInstance*> oTaskInstances;    std::vector<CTaskInstance*>::iterator iter;    CTaskInstance* pTaskInstance = NULL;    CRPCProfile* pRPCProfile = NULL;    CSyncProfile* pSyncProfile = NULL;    wxDateTime dtExpirationDate = wxDateTime((time_t)0);    wxDateTime dtRPCCompletedDate = wxDateTime((time_t)0);    wxUint32 uiInterval = 0;    rc = m_pHost->FindSyncProfile(CBSLClient::AutoSyncPropertyTaskInstancesUpdateInterval, &pSyncProfile);    if (BSLERR_SUCCESS != rc) return;    if (!pSyncProfile) return;    rc = m_pHost->FindRPCProfile(CLASSINFO(CRPCSyncTaskInstances)->GetClassName(), &pRPCProfile);    if (BSLERR_SUCCESS != rc) return;    if (!pRPCProfile) return;    uiInterval = pSyncProfile->GetValue();    if (!uiInterval) return;    dtRPCCompletedDate = pRPCProfile->GetLastRequestTime() + pRPCProfile->GetTotalDuration();    rc = m_pHost->EnumerateTaskInstances(oTaskInstances);    if (BSLERR_SUCCESS != rc) return;    for (iter = oTaskInstances.begin(); iter != oTaskInstances.end(); ++iter)    {        pTaskInstance = *iter;        // An item is deemed expired if it wasn't refreshed the last time the synchronize        // RPC was called.        //        dtExpirationDate =            pTaskInstance->GetLastModifiedTime() +            wxTimeSpan(0, 0, uiInterval, 0) +            wxTimeSpan(0, 0, 0, 250);        if ((m_dtNow > dtExpirationDate) && (dtRPCCompletedDate > dtExpirationDate))        {            wxLogTrace(wxT("Function Status"),                wxT("CGarbageCollector::RecycleTaskInstances - Recycle '%p', dtNow: '%s', dtExpirationDate: '%s', dtRPCCompletedDate: '%s'"),                pTaskInstance,                m_dtNow.Format(wxT("%H:%M:%S.%l")).c_str(),                dtRPCCompletedDate.Format(wxT("%H:%M:%S.%l")).c_str(),                dtExpirationDate.Format(wxT("%H:%M:%S.%l")).c_str()            );            m_pHost->DeleteTaskInstance(pTaskInstance);        }    }}
开发者ID:romw,项目名称:boincsentinels,代码行数:54,


示例7: tutorial2

inttutorial2(bool testMode){  int rc = 0;  if (wxFileName::IsFileReadable(wxS("smile.jpg")) &&      wxFileName::IsFileReadable(wxS("apple.gif")))  {    // Instantiation of inherited class    PdfTuto2 pdf;    if (testMode)    {      pdf.SetCreationDate(wxDateTime(1, wxDateTime::Jan, 2017));      pdf.SetCompression(false);    }    pdf.AliasNbPages();    pdf.AddPage();    pdf.Image(wxS("smile.jpg"), 70, 40, 12);    pdf.Image(wxS("apple.gif"), 110, 40, 25);    pdf.SetFont(wxS("Times"), wxS(""), 12);    int i;    for (i = 1; i <= 40; i++)    {      pdf.Cell(0, 10, wxString::Format(wxS("Printing line number %d"), i), 0, 1);    }    pdf.SaveAsFile(wxS("tutorial2.pdf"));  }  else  {    rc = 1;  }  return rc;}
开发者ID:maxmods,项目名称:wx.mod,代码行数:32,


示例8: wxMemoryInputStream

wxFSFile* wxFileSystemBlobHandler::OpenFile(wxFileSystem& fs, const wxString& location){	auto pos = location.Find(':');	if (pos != 4) {		return 0;	}	wxString data = location.Mid(pos + 1);	if (data.size() % 2) {		return 0;	}	wxChar const* str = data.c_str();	unsigned char* buf = static_cast<unsigned char*>(malloc(data.size() / 2));	for (size_t i = 0; i < data.size() / 2; ++i) {		buf[i] = static_cast<unsigned char>(fz::hex_char_to_int(str[i * 2]) * 16 + fz::hex_char_to_int(str[i * 2 + 1]));	}	// Whoever came up with the API for the wx streams obviously didn't ever use it.	// Why else wouldn't it have an ownership-taking constructor?	auto stream = new wxMemoryInputStream(0, data.size() / 2); 	// Or why does it expect a buffer allocated with malloc?	stream->GetInputStreamBuffer()->SetBufferIO(buf, data.size() / 2, true);	return new wxFSFile(stream, location, _T(""), _T(""), wxDateTime());}
开发者ID:aswinpj,项目名称:FileZilla,代码行数:27,


示例9: GetClubNameById

void udfTrainersMngrDlg::OnSelectTrainer(wxCommandEvent& event){	do	{		int nItem = m_listTrainers->GetSelection();		if(nItem == -1)			break;				int nId = *(int*)m_listTrainers->GetClientData(nItem);				CTrainersTable::tTableIt it = m_Trainers.find(nId);		if(it == m_Trainers.end())			break;				CTrainersTable::tDATA& data = it->second;		m_textName->SetValue(data.name);		m_textEmail->SetValue(data.email);		m_textInfo->SetValue(data.additionalInfo);		m_textPhone->SetValue(data.phone);				wxString clubName = GetClubNameById(data.clubId);		if(!clubName.IsEmpty())		{			m_comboClub->SetValue(clubName);		}				m_dateBd->SetValue(wxDateTime(data.bd));	}while(0);}
开发者ID:AndrianDTR,项目名称:udf,代码行数:29,


示例10: WXUNUSED

wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location){    // location has Unix path separators    wxString right = GetRightLocation(location);    wxFileName fn = wxFileSystem::URLToFileName(right);    wxString fullpath = ms_root + fn.GetFullPath();    if (!wxFileExists(fullpath))        return (wxFSFile*) NULL;    // we need to check whether we can really read from this file, otherwise    // wxFSFile is not going to work    wxFFileInputStream *is = new wxFFileInputStream(fullpath);    if ( !is->Ok() )    {        delete is;        return (wxFSFile*) NULL;    }    return new wxFSFile(is,                        right,                        GetMimeTypeFromExt(location),                        GetAnchor(location)#if wxUSE_DATETIME                        ,wxDateTime(wxFileModificationTime(fullpath))#endif // wxUSE_DATETIME                        );}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:28,


示例11: wxDateTime

wxDateTime wxCalendarCtrl::GetDate() const{    if ( !m_qtCalendar )        return wxDateTime();    return wxQtConvertDate(m_qtCalendar->selectedDate());}
开发者ID:jfiguinha,项目名称:Regards,代码行数:7,


示例12: dt

void ValuesTable::InsertValue(DatabaseQuery::ValueData::V *v, bool &view_values_changed, bool& stats_updated) {	DTime dt(m_draw->GetPeriod(), wxDateTime(v->time));	int view_index = m_draw->m_index.GetStartTime().GetDistance(dt);	int index = view_index + m_view.Start();	if (index < 0 || index >= (int)m_values.size()) 		return;	if (m_values.at(index).IsData())		return;	ValueInfo& vi = m_values.at(index);	vi.av_val = v->response;	vi.sum = v->sum;	vi.first_val = v->first_val;	vi.last_val = v->last_val;	vi.count_probes = v->count;	switch (m_draw->m_draw_info->GetAverageValueCalculationMethod()) {		case AVERAGE_VALUE_CALCULATION_AVERAGE:			vi.db_val = v->response;			break;		case AVERAGE_VALUE_CALCULATION_LAST:			vi.db_val = v->last_val;			break;		case AVERAGE_VALUE_CALCULATION_LAST_FIRST:			vi.db_val = v->last_val - v->first_val;			break;	}	UpdateProbesValues(index, stats_updated, view_values_changed);}
开发者ID:cyclefusion,项目名称:szarp,代码行数:34,


示例13: WXUNUSED

wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location){    // location has Unix path separators    wxString right = GetRightLocation(location);    wxFileName fn = wxFileSystem::URLToFileName(right);    wxString fullpath = ms_root + fn.GetFullPath();    if (!wxFileExists(fullpath))        return NULL;    // we need to check whether we can really read from this file, otherwise    // wxFSFile is not going to work#if wxUSE_FFILE    wxFFileInputStream *is = new wxFFileInputStream(fullpath);#elif wxUSE_FILE    wxFileInputStream *is = new wxFileInputStream(fullpath);#else#error One of wxUSE_FILE or wxUSE_FFILE must be set to 1 for wxFSHandler to work#endif    if ( !is->IsOk() )    {        delete is;        return NULL;    }    return new wxFSFile(is,                        location,                        wxEmptyString,                        GetAnchor(location)#if wxUSE_DATETIME                        ,wxDateTime(wxFileModificationTime(fullpath))#endif // wxUSE_DATETIME                        );}
开发者ID:BauerBox,项目名称:wxWidgets,代码行数:34,


示例14: mmBDDialog

void Test_BillsDeposits::test_enter_simple_entry(){    Model_Billsdeposits::Data_Set bill_table = Model_Billsdeposits::instance().all();    if (bill_table.size() < 1) return;    m_user_request->Show_InfoBarMessage(        "Please confirm Simple entry - Enter/n/n"        "Account Name: Savings,   Repeats: Monthly/n"        "Amount: 200,   Payee: Supermarket/n"        "Category: Food/Groceries/n");    Model_Billsdeposits::Data bill_entry = bill_table.at(bill_table.size() - 1);    mmBDDialog* dlg = new mmBDDialog(m_base_frame, bill_entry.BDID, false, true);    if (dlg->ShowModal() == wxID_OK)    {        bill_table = Model_Billsdeposits::instance().all();        bill_entry = bill_table.at(bill_table.size() - 1);        CPPUNIT_ASSERT(bill_entry.REPEATS == Model_Billsdeposits::REPEAT_MONTHLY);        wxDateTime next_date = wxDateTime(wxDateTime::Today()).Add(wxDateSpan::Month());        CPPUNIT_ASSERT(bill_entry.NEXTOCCURRENCEDATE == next_date.FormatISODate());        Model_Checking::Data_Set checking_table = Model_Checking::instance().all();        CPPUNIT_ASSERT(checking_table.size() > 0);        Model_Checking::Data checking_entry = checking_table.at(checking_table.size() - 1);        CPPUNIT_ASSERT(checking_entry.ACCOUNTID == Model_Account::instance().get("Savings")->ACCOUNTID);        CPPUNIT_ASSERT(checking_entry.TRANSAMOUNT == 200);        CPPUNIT_ASSERT(checking_entry.TOTRANSAMOUNT == 200);    }}
开发者ID:Zorg2409,项目名称:moneymanagerex,代码行数:30,


示例15: wxDateTime

/// For testing: triggered by Advanced / Options menu item.void CMainDocument::TestAsyncRPC() {    ALL_PROJECTS_LIST pl;    ASYNC_RPC_REQUEST request;    wxDateTime completionTime = wxDateTime((time_t)0);    int req_retval = 0, rpc_result = 0;    completionTime.ResetTime();    request.which_rpc = RPC_GET_ALL_PROJECTS_LIST;    request.arg1 = &pl;    request.exchangeBuf = NULL;    request.arg2 = NULL;    request.arg3 = NULL;    request.arg4 = NULL;    request.rpcType = RPC_TYPE_WAIT_FOR_COMPLETION;    request.completionTime = &completionTime;//    request.result = NULL;    request.resultPtr = &rpc_result;        // For testing async RPCs    request.isActive = false;    //retval = rpcClient.get_all_projects_list(pl);    req_retval = RequestRPC(request, true);    wxString s = completionTime.FormatTime();    wxLogMessage(wxT("Completion time = %s"), s.c_str());    wxLogMessage(wxT("RequestRPC returned %d/n"), req_retval);    ::wxSafeYield(NULL, true);  // Allow processing of RPC_FINISHED event    wxLogMessage(wxT("rpcClient.get_all_projects_list returned %d/n"), rpc_result);}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:31,


示例16: SetFileName

TiXmlElement* CXmlFile::Load(const wxFileName& fileName){	if (fileName.IsOk())		SetFileName(fileName);	wxCHECK(m_fileName.IsOk(), 0);	delete m_pDocument;	m_pDocument = 0;	TiXmlElement* pElement = GetXmlFile(m_fileName);	if (!pElement)	{		m_modificationTime = wxDateTime();		return 0;	}	{		wxLogNull log;		m_modificationTime = m_fileName.GetModificationTime();	}	m_pDocument = pElement->GetDocument();	return pElement;}
开发者ID:idgaf,项目名称:FileZilla3,代码行数:25,


示例17: SetFileName

TiXmlElement* CXmlFile::Load(const wxFileName& fileName){	if (fileName.IsOk())		SetFileName(fileName);	wxCHECK(m_fileName.IsOk(), 0);	delete m_pDocument;	m_pDocument = 0;	wxString error;	TiXmlElement* pElement = GetXmlFile(m_fileName, &error);	if (!pElement)	{		if (!error.empty())		{			m_error.Printf(_("The file '%s' could not be loaded."), m_fileName.GetFullPath().c_str());			if (!error.empty())				m_error += _T("/n") + error;			else				m_error += wxString(_T("/n")) + _("Make sure the file can be accessed and is a well-formed XML document.");			m_modificationTime = wxDateTime();		}		return 0;	}	{		wxLogNull log;		m_modificationTime = m_fileName.GetModificationTime();	}	m_pDocument = pElement->GetDocument();	return pElement;}
开发者ID:bartojak,项目名称:osp-filezilla,代码行数:34,


示例18: a_

CDateTime::CDateTime( int year, int month, int day, int hour, int minute, int second, int millisecond )	: a_(){	if( !Set( year, month, day, hour, minute, second, millisecond ) ) {		t_ = wxDateTime();	}}
开发者ID:Typz,项目名称:FileZilla,代码行数:7,


示例19: localtime

void ParamEdit::TransferToWindow(DefinedParam *param) {	DrawsSets *ds = m_cfg_mgr->GetConfigByPrefix(param->GetBasePrefix());	m_button_base_config->SetLabel(ds->GetID());	m_prec_spin->SetValue(param->GetPrec()); 	m_formula_input->SetText(param->GetFormula());	m_user_param_label->SetLabel(param->GetParamName().BeforeLast(L':') + L':');	m_param_name_input->SetValue(param->GetParamName().AfterLast(L':'));	m_unit_input->SetValue(param->GetUnit());	m_formula_type_choice->SetSelection(param->GetFormulaType() == TParam::LUA_VA ? 0 : 1);			if (param->GetStartTime() > 0) {		struct tm *start_date;		time_t tmp_time = param->GetStartTime();		start_date = localtime(&tmp_time);			m_spin_ctrl_start_minutes->SetValue(start_date->tm_min);		m_spin_ctrl_start_hours->SetValue(start_date->tm_hour);			m_datepicker_ctrl_start_date->SetValue(wxDateTime(param->GetStartTime()));		m_checkbox_start->SetValue(true);				m_datepicker_ctrl_start_date->Enable(true);		m_spin_ctrl_start_hours->Enable(true);		m_spin_ctrl_start_minutes->Enable(true);	}}
开发者ID:cyclefusion,项目名称:szarp,代码行数:29,


示例20: wxDateTime

void VHDDExplorer::UpdateList(){	m_list->Freeze();	m_list->DeleteAllItems();	m_entries.clear();	m_names.clear();	u64 block;	vfsHDD_Entry entry;	std::string name;	for(bool is_ok = m_hdd->GetFirstEntry(block, entry, name); is_ok; is_ok = m_hdd->GetNextEntry(block, entry, name))	{		int item = m_list->GetItemCount();		m_list->InsertItem(item, fmt::FromUTF8(name));		m_list->SetItem(item, 1, entry.type == vfsHDD_Entry_Dir ? "Dir" : "File");		m_list->SetItem(item, 2, wxString::Format("%lld", entry.size));		m_list->SetItem(item, 3, wxDateTime().Set(time_t(entry.ctime)).Format());		m_entries.push_back(entry);		m_names.push_back(name);	}	m_list->SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER);	m_list->SetColumnWidth(1, wxLIST_AUTOSIZE_USEHEADER);	m_list->SetColumnWidth(2, wxLIST_AUTOSIZE_USEHEADER);	m_list->SetColumnWidth(3, wxLIST_AUTOSIZE_USEHEADER);	m_list->Thaw();}
开发者ID:Aishou,项目名称:rpcs3,代码行数:28,


示例21: wxDateTime

void mmHomePagePanel::getExpensesIncomeStats(std::map<int, std::pair<double, double> > &incomeExpensesStats    , mmDateRange* date_range)const{    //Initialization    bool ignoreFuture = mmIniOptions::instance().ignoreFutureTransactions_;    wxDateTime start_date = wxDateTime(date_range->end_date()).SetDay(1);    //Calculations    const auto &transactions = Model_Checking::instance().find(        Model_Checking::TRANSDATE(date_range->start_date(), GREATER_OR_EQUAL)        , Model_Checking::TRANSDATE(date_range->end_date(), LESS_OR_EQUAL)        , Model_Checking::STATUS(Model_Checking::VOID_, NOT_EQUAL)        , Model_Checking::TRANSCODE(Model_Checking::TRANSFER, NOT_EQUAL)        );    for (const auto& pBankTransaction : transactions)    {        if (ignoreFuture)        {            if (Model_Checking::TRANSDATE(pBankTransaction).IsLaterThan(date_range->today()))                continue; //skip future dated transactions        }        // We got this far, get the currency conversion rate for this account        Model_Account::Data *account = Model_Account::instance().get(pBankTransaction.ACCOUNTID);        double convRate = (account ? Model_Account::currency(account)->BASECONVRATE : 1);        int idx = pBankTransaction.ACCOUNTID;        if (Model_Checking::type(pBankTransaction) == Model_Checking::DEPOSIT)            incomeExpensesStats[idx].first += pBankTransaction.TRANSAMOUNT * convRate;        else            incomeExpensesStats[idx].second += pBankTransaction.TRANSAMOUNT * convRate;    }}
开发者ID:leandrosob,项目名称:moneymanagerex,代码行数:34,



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


C++ wxDisplaySize函数代码示例
C++ wxDataViewItem函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。