Beispiel #1
0
void milPanel::onClearClick( wxCommandEvent& WXUNUSED(event) )
{
	long style;
	wxString caption;

	wxString msg(_("Warning!\n\nYour vehicle is displaying the MIL for a reason."\
		"Do not reset the trouble codes unless you know what you are doing.\n\n" \
		"Are you sure you want to proceed?"));
	wxMessageDialog dialog(NULL, msg, _("Warning"), wxYES_NO | wxNO_DEFAULT | wxICON_EXCLAMATION);

	int proceed = dialog.ShowModal();

	if (proceed == wxID_YES) {
		if (obd->obd_clear_dtc()) {
			msg = _("All error codes have been successfully cleared");
			style = wxOK | wxICON_INFORMATION;
			caption = _("DTC's Cleared");
		} else {
			msg = _("The ECU reported that it did not clear the error codes");
			style = wxOK | wxICON_ERROR;
			caption = _("Error");
		}

		wxMessageDialog clearDialog(NULL, msg, caption, style);
		clearDialog.ShowModal();
		this->updateStatus();
	}
}
Beispiel #2
0
void AddDevice::getDialog(QJsonObject& newDialog)
{
    clearDialog();
    addVar(createConfigStringVar("name", "Device name", m_deviceName));
    addVar(createConfigSelectionFromListVar("type", "Device type",
                    g_deviceDatabase->displayType(m_deviceType), g_deviceDatabase->listDeviceTypes()));
    return dialog(newDialog);
}
Beispiel #3
0
void PulseAddDialog::postPulse()
{
    std::cerr << "PulseAddDialog::postPulse()";
    std::cerr << std::endl;

#if 0
    /* we need to iterate through each photoItem, and extract the details */


    RsPhotoAlbum album;
    RsPhotoThumbnail albumThumb;

    album.mShareOptions.mShareType = 0;
    album.mShareOptions.mShareGroupId = "unknown";
    album.mShareOptions.mPublishKey = "unknown";
    album.mShareOptions.mCommentMode = 0;
    album.mShareOptions.mResizeMode = 0;

    album.mTitle = ui.lineEdit_Title->text().toStdString();
    album.mCategory = "Unknown";
    album.mCaption = ui.lineEdit_Caption->text().toStdString();
    album.mWhere = ui.lineEdit_Where->text().toStdString();
    album.mWhen = ui.lineEdit_When->text().toStdString();

    if (rsPhoto->submitAlbumDetails(album, albumThumb))
    {
        /* now have path and album id */
        int photoCount = ui.scrollAreaWidgetContents->getPhotoCount();

        for(int i = 0; i < photoCount; i++)
        {
            RsPhotoPhoto photo;
            RsPhotoThumbnail thumbnail;
            PhotoItem *item = ui.scrollAreaWidgetContents->getPhotoIdx(i);
            photo = item->mDetails;
            item->getPhotoThumbnail(thumbnail);

            photo.mAlbumId = album.mAlbumId;
            photo.mOrder = i;

            /* scale photo if needed */
            if (album.mShareOptions.mResizeMode)
            {
                /* */

            }
            /* save image to album path */
            photo.path = "unknown";

            rsPhoto->submitPhoto(photo, thumbnail);
        }
    }

#endif
    clearDialog();

    hide();
}
void KafkaConfigure::getDialog(QJsonObject& newDialog)
{
    clearDialog();
    addVar(createConfigStringVar("brokerList", "Kafka broker list", m_brokerList));
    addVar(createConfigStringVar("videoPath", "Path to video data", m_videoPath));
    addVar(createGraphicsLineVar());
    addVar(createGraphicsStringVar("Restart app to implement changes"));
    return dialog(newDialog);
}
Beispiel #5
0
void PulseAddDialog::cancelPulse()
{
    std::cerr << "PulseAddDialog::cancelPulse()";
    std::cerr << std::endl;

    clearDialog();
    hide();

    return;
}