Example #1
0
QString Address::toInsertSqlQuery() const
{
    QString strF =
          "INSERT INTO  %1 (BUILD_ID, BUILD, STREET_ID, STREET, "
          "TYPE_OF_STREET, KORP, LITERA, CORRECT, CITY1, "
          "TYPE_OF_CITY1, TYPE_OF_CITY2, CITY2, FSUBJ, DISTRICT, "
          "ADDITIONAL, RAW, TYPE_OF_FSUBJ) "
          "VALUES('%2', '%3', '%4', '%5', '%6', "
          "'%7', '%8', '%9', '%10', '%11', '%12', '%13', "
          "'%14', '%15', '%16', '%17', '%18'); ";

    QString str =
            strF
            .arg(TableName)
            .arg(QString::number(getBuildId()))
            .arg(getBuild())
            .arg(QString::number(getStreetId()))
            .arg(getStreet())
            .arg(getTypeOfStreet())
            .arg(getKorp())
            .arg(getLitera())
            .arg(QString(isCorrect()?"1":"0"))
            .arg(getCity1())
            .arg(getTypeOfCity1())
            .arg(getTypeOfCity2())
            .arg(getCity2())
            .arg(getFsubj())
            .arg(getDistrict())
            .arg(getAdditional())
            .arg(getRawAddress().join("\";\"").insert(0,'\"').append('\"'))
            .arg(getTypeOfFSubjInString());
    return str;
}
Example #2
0
QString Address::toCsv() const
{
    QString res;
    if(!isEmpty())
    {
        res += "\""+ QString::number(getStreetId()) + "\";\"";
        res += QString::number(getBuildId()) + "\";\"";
        res += getRawAddress().join(';') + "\";\"";
        res += getTypeOfFSubjInString() + "\";\"";
        res += getFsubj() + "\";\"";
        res += getDistrict() + "\";\"";
        res += getTypeOfCity1() + "\";\"";
        res += getCity1() + "\";\"";
        res += getTypeOfCity2() + "\";\"";
        res += getCity2() + "\";\"";
        res += getTypeOfStreet() + "\";\"";
        res += getStreet() + "\";\"";
        res += getAdditional() + "\";\"";
        res += getBuild() + "\";\"";
        res += getKorp() + "\";\"";
        res += getLitera() + "\";\"";
        res += QString(isCorrect()?"1":"0") + "\"";
    }
    else
    {
        res += "Is empty\n";
    }
    return res;
}
Example #3
0
        void AppInfoPanel::createGui() {
            const wxBitmap appIconImage = IO::loadImageResource("AppIcon.png");
            wxStaticBitmap* appIcon = new wxStaticBitmap(this, wxID_ANY, appIconImage);
            wxStaticText* appName = new wxStaticText(this, wxID_ANY, "TrenchBroom");
            appName->SetFont(appName->GetFont().Larger().Larger().Larger().Larger().Bold());
            wxStaticLine* appLine = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
            wxStaticText* appClaim = new wxStaticText(this, wxID_ANY, "Level Editor");
            
            wxString versionStr("Version ");
            versionStr << getBuildVersion() << " " << getBuildChannel();
            
            wxString buildStr("Build ");
            buildStr << getBuildId() << " " << getBuildType();
            
            wxStaticText* version = new wxStaticText(this, wxID_ANY, versionStr);
            wxStaticText* build = new wxStaticText(this, wxID_ANY, buildStr);
#if !defined(_WIN32)
            version->SetFont(version->GetFont().Smaller());
            build->SetFont(build->GetFont().Smaller());
#endif
            version->SetForegroundColour(wxColor(128, 128, 128));
            build->SetForegroundColour(wxColor(128, 128, 128));
            
            SetBackgroundColour(*wxWHITE);
            
            wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
            sizer->Add(appIcon, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->Add(appName, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->Add(appLine, 0, wxEXPAND);
            sizer->Add(appClaim, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->Add(version, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->Add(build, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->AddStretchSpacer();
            SetSizerAndFit(sizer);
        }
Example #4
0
QString Address::toDebug() const
{
    QString res;
    res +="*** Address: ***\n";
    res += "StreetID: " + QString::number(getStreetId()) + "\n";
    res += "BuildID: " + QString::number(getBuildId()) + "\n";
    res += "Type of Federal Subj: " + getTypeOfFSubjInString() + "\n";
    res += "Federal subj: " + getFsubj() + "\n";
    res += "District: " + getDistrict() + "\n";
    res += "Type of City1: " + getTypeOfCity1() + "\n";
    res += "City1: " + getCity1() + "\n";
    res += "Type of City2: " + getTypeOfCity2() + "\n";
    res += "City2: " + getCity2() + "\n";
    res += "Type of Street: " + getTypeOfStreet() + "\n";
    res += "Street: " + getStreet() + "\n";
    res += "Additional: " + getAdditional() + "\n";
    res += "Build: " + getBuild() + "\n";
    res += "Korpus: " + getKorp() + "\n";
    res += "Litera: " + getLitera() + "\n";
    res += "Correct: " + QString(isCorrect()?"1":"0") + "\n";
    return res;
}