Example #1
0
void OpenDialog::browseInputSlave()
{
    OpenDialog *od = new OpenDialog( this, p_intf, true, SELECT );
    od->exec();
    ui.slaveText->setText( od->getMRL( false ) );
    delete od;
}
Example #2
0
void VLMDialog::selectInput()
{
    OpenDialog *o = OpenDialog::getInstance( this, p_intf, false, SELECT, true );
    o->exec();
    ui.inputLedit->setText( o->getMRL( false ) );
    inputOptions = o->getOptions();
}
Example #3
0
void VocabDialog::OnAddPair(wxCommandEvent& event) {
    OpenDialog * od = new OpenDialog(this, wxID_ANY, translate("Open File(s)"));

    if (od->ShowModal() != wxID_OK) {
        od->Destroy();
        return;
    }

    wxString sourcePath = od->GetSourcePath();
    wxString transPath = od->GetTransPath();
    int sourceFallbackEnc = od->GetSourceFallbackEnc();
    int transFallbackEnc = od->GetTransFallbackEnc();
    od->Destroy();

    if (sourcePath.empty() || transPath.empty()) {
        wxMessageBox(
            FromUTF8("Invalid file combination selected."),
            translate("StrEdit: Error"),
            wxOK | wxICON_ERROR,
            this);
        return;
    }

    int nextIndex = vocabPairList->GetItemCount();
    vocabPairList->InsertItem(nextIndex, sourcePath);
    vocabPairList->SetItem(nextIndex, 1, transPath);
    vocabPairList->SetItem(nextIndex, 2, wxString::Format(wxT("%i"), sourceFallbackEnc));
    vocabPairList->SetItem(nextIndex, 3, wxString::Format(wxT("%i"), transFallbackEnc));
}
Example #4
0
void DialogsProvider::Open( int i_access_method, int i_arg )
{
    /* Show/hide the open dialog */
    if( !p_open_dialog )
        p_open_dialog = new OpenDialog( p_intf, this, i_access_method, i_arg,
                                        OPEN_NORMAL );

    if( p_open_dialog )
    {
        p_open_dialog->Show( i_access_method, i_arg );
    }
}
Example #5
0
QSizeF ContentItemCreator::cellSize() const
{
    return m_gridPage->itemSize();
}