コード例 #1
0
ファイル: ComplxFrame.cpp プロジェクト: TricksterGuy/complx
void ComplxFrame::OnRunComplete(wxThreadEvent& event)
{
    std::cout.flush();
    console->Update();
    UpdatePlay();
    UpdateRegisters();
    UpdateMemory();
    UpdateStatus();
}
コード例 #2
0
ファイル: ComplxFrame.cpp プロジェクト: cchen396/complx
/** DoLoadMachine
  *
  * Handles loading a machine state
  */
void ComplxFrame::DoLoadMachine(const wxFileName& filename)
{
    std::ifstream file(filename.GetFullName().c_str(), std::ios::binary);
    file.read((char*) &state, sizeof(state));
    file.close();
    UpdateRegisters();
    UpdateMemory();
    UpdateStatus();
}
コード例 #3
0
ファイル: ComplxFrame.cpp プロジェクト: cchen396/complx
/** DoLoadFile
  *
  * Handles loading an assembly file into the simulator
  */
void ComplxFrame::DoLoadFile(const wxFileName& filename)
{
    //CleanUp();
    lc3_state dummy_state;
    lc3_init(dummy_state);

    // Save the symbols
    std::map<std::string, unsigned short> symbol_table = state.symbols;
    std::map<unsigned short, std::string> rev_symbol_table = state.rev_symbols;

    state.symbols.clear();
    state.rev_symbols.clear();
    lc3_remove_plugins(state);

    try
    {
        lc3_assemble(dummy_state, filename.GetFullPath().ToStdString(), false);
        lc3_assemble(state, filename.GetFullPath().ToStdString());

    }
    catch (LC3AssembleException e)
    {
        wxMessageBox(wxString::Format("BAD STUDENT! %s", e.what()), _("Loading ") + filename.GetFullName() + _(" Failed"));
        goto merge;
    }
    catch (std::vector<LC3AssembleException> e)
    {
        std::stringstream oss;
        for (unsigned int i = 0; i < e.size(); i++)
            oss << e[i].what() << std::endl;
        wxMessageBox(wxString::Format("BAD STUDENT! %s", oss.str()), _("Loading ") + filename.GetFullName() + _(" Failed"));
        goto merge;
    }

    //if (DoAssemble(filename)) return;
    currentFile = filename;
    SetTitle(wxString::Format("Complx - %s", filename.GetFullPath()));
    merge:

    std::map<std::string, unsigned short>::const_iterator i;
    std::map<unsigned short, std::string>::const_iterator j;
    for (i = symbol_table.begin(); i != symbol_table.end(); ++i)
    {
        state.symbols[i->first] = i->second;
    }
    for (j = rev_symbol_table.begin(); j != rev_symbol_table.end(); ++j)
    {
        state.rev_symbols[j->first] = j->second;
    }

    //DoLoad(filename);
    UpdateStatus();
    UpdateRegisters();
    UpdateMemory();

}
コード例 #4
0
ファイル: ComplxFrame.cpp プロジェクト: cchen396/complx
/** @brief OnNoIo
  *
  * @todo: document this function
  */
void ComplxFrame::OnNoIo(wxThreadEvent& event)
{
    //printf("There is no time\n");
    wxCriticalSectionLocker enter(threadCS);
    if (thread != NULL && !thread->IsPaused()) thread->Pause();
    if (!refreshednoio)
    {
        UpdatePhrase("&NO IO");
        UpdateRegisters();
        UpdateMemory();
        UpdateStatus();
        refreshednoio = true;
    }
}
コード例 #5
0
ファイル: ComplxFrame.cpp プロジェクト: cchen396/complx
void ComplxFrame::SetupExecution(int run_mode, int runtime)
{
    wxCriticalSectionLocker enter(threadCS);
    changed = false;
    if (thread != NULL)
    {
        if (thread->IsPaused()) return;
        if (thread->IsRunning())
        {
            //printf("Deleting thread\n");
            thread->Delete();
            //delete thread;
            thread = NULL;
            changed = true;
            std::cout.flush();
            console->Update();
            UpdatePlay();
            UpdateRegisters();
            UpdateMemory();
            UpdateStatus();
            return;
        }
        else
        {
//            //printf("Deleting and Creating thread\n");
            thread->Delete();
            thread = NULL;
            //delete thread;
            //thread = new LC3RunThread(this, run_mode);
            //thread->Create();
            //UpdateStop();
            return;
        }
    }
    else
    {
        //printf("Creating thread\n");
        thread = new LC3RunThread(this, run_mode, runtime);
        thread->Create();
        //UpdateStop();
    }

    thread->SetPriority(0);
    thread->Run();
}
コード例 #6
0
ファイル: ComplxFrame.cpp プロジェクト: TricksterGuy/complx
void ComplxFrame::SetupExecution(int run_mode, int runtime)
{
    wxCriticalSectionLocker enter(threadCS);
    if (run_mode != RUNMODE_STEP && run_mode != RUNMODE_BACK)
        UpdatePhrase("&Stop");
    if (thread != NULL)
    {
        if (thread->IsPaused()) return;
        if (thread->IsRunning())
        {
            thread->Delete();
            thread = NULL;
            std::cout.flush();
            console->Update();
            UpdatePlay();
            UpdateRegisters();
            UpdateMemory();
            UpdateStatus();
            return;
        }
        else
        {
            thread->Delete();
            thread = NULL;
            return;
        }
    }
    else
    {
        thread = new LC3RunThread(this, run_mode, runtime);
        thread->Create();
    }

    thread->SetPriority(0);
    thread->Run();
}
コード例 #7
0
ファイル: ComplxFrame.cpp プロジェクト: cchen396/complx
/** OnIdle
  *
  * Called once when the app starts.
  */
void ComplxFrame::OnIdle(wxIdleEvent& event)
{
    this->Disconnect(wxEVT_IDLE, wxIdleEventHandler(ComplxFrame::OnIdle));
    UpdateRegisters();
    UpdateMemory();
}
コード例 #8
0
ファイル: ComplxFrame.cpp プロジェクト: TricksterGuy/complx
/** DoLoadFile
  *
  * Handles loading an assembly file into the simulator
  */
void ComplxFrame::DoLoadFile(const LoadingOptions& opts)
{
    auto* config = wxConfigBase::Get();

    wxFileName filename(opts.file);
    bool randomize_registers = opts.registers == RANDOMIZE;
    bool randomize_memory = opts.memory == RANDOMIZE;
    short fill_registers = opts.registers;
    short fill_memory = opts.memory;

    lc3_init(state, randomize_registers, randomize_memory, fill_registers, fill_memory);
    state.pc = opts.pc;

    PostInit();

    // Now the actual loading
    if (opts.file.empty())
        return;

    lc3_state dummy_state;
    lc3_init(dummy_state);

    // Save the symbols
    std::map<std::string, unsigned short> symbol_table = state.symbols;
    std::map<unsigned short, std::string> rev_symbol_table = state.rev_symbols;

    state.symbols.clear();
    state.rev_symbols.clear();
    lc3_remove_plugins(state);

    bool tvt_modification = false;
    bool ivt_modification = false;
    bool subroutine_found = false;

    try
    {
        ///TODO should only make one call to lc3_assemble.
        std::vector<code_range> ranges;
        LC3AssembleOptions options;
        options.multiple_errors = false;
        lc3_assemble(dummy_state, filename.GetFullPath().ToStdString(), options);
        options.multiple_errors = true;
        options.warnings_as_errors = false;
        options.process_debug_comments = true;
        options.enable_warnings = false;
        options.disable_plugins = false;
        lc3_assemble(state, filename.GetFullPath().ToStdString(), ranges, options);

        // Update list of addresses modified for Show only Code/Data option.
        modified_addresses.clear();
        for (const auto& code_range : ranges)
            modified_addresses.push_back(ViewRange(code_range.location, code_range.location + code_range.size));
        /// TODO Automatically determine state of true traps and interrupts via the code ranges.
        // Dummy call to update hidden addresses.
        wxCommandEvent event;
        OnUpdateHideAddresses(event);
        // Check for TVT and IVT modification
        for (const auto& code_range : ranges)
        {
            if ((code_range.location >= 0 && code_range.location <= 0xFF) || (code_range.location + code_range.size >= 0 && code_range.location + code_range.size <= 0xFF))
                tvt_modification = true;
            if ((code_range.location >= 0x100 && code_range.location <= 0x1FF) || (code_range.location + code_range.size >= 0x100 && code_range.location + code_range.size <= 0x1FF))
                ivt_modification = true;
        }
        subroutine_found = DetectSubroutine(ranges);
    }
    catch (LC3AssembleException e)
    {
        wxMessageBox(wxString::Format("ERROR! %s", e.what()), wxString::Format("Loading %s failed", filename.GetFullName()));
        goto merge;
    }
    catch (std::vector<LC3AssembleException> e)
    {
        std::stringstream oss;
        for (unsigned int i = 0; i < e.size(); i++)
            oss << e[i].what() << std::endl;
        wxMessageBox(wxString::Format("ERROR! %s", oss.str()), wxString::Format("Loading %s failed", filename.GetFullName()));
        goto merge;
    }

    lc3_set_true_traps(state, opts.true_traps || tvt_modification);
    state.interrupt_enabled = opts.interrupts || ivt_modification;
    console->SetInput(opts.console_input);
    state.strict_execution = opts.strict_execution;
    // Update menus
    menuStateTrueTraps->Check(opts.true_traps || tvt_modification);
    menuStateInterrupts->Check(opts.interrupts || ivt_modification);
    menuStateStrictExecution->Check(opts.strict_execution);

    if (tvt_modification)
    {
        bool tvt_popup = config->Read("/firsttimetrap", "").IsEmpty();
        if (tvt_popup)
        {
            wxMessageBox("Pardon the interruption!\n"
                         "It appears you have loaded a file with a custom trap.\n"
                         "This will automatically enable true traps mode.\n"
                         "This will allow you to step into the code for the standard traps (IN,OUT,GETC,PUTS,HALT) and your own custom trap.\n"
                         "This notice to to remind you of the above, executing HALT will jump to some random code, but I assure you this random code is the code to HALT the LC-3.\n"
                         "If you'd rather stop the execution right at the HALT statement then put a breakpoint on your HALT statement.\n",
                         "Notice");
            config->Write("/firsttimetrap", "1");
        }
    }

    if (subroutine_found)
    {
        wxCommandEvent event;
        OnControlModeAdvanced(event);
        bool subroutine_popup = config->Read("/firsttimesubroutine", "").IsEmpty();
        if (subroutine_popup)
        {
            wxMessageBox("Pardon the interruption!\n"
                         "It appears you have loaded a file with a custom trap or subroutine.\n"
                         "You may notice 3 new buttons in the control area.\n"
                         "Next Line\n    Allows you to STEP OVER a subroutine or trap, meaning it will skip over it (but still execute it).\n"
                         "Prev Line\n    Allows you to BACK STEP OVER a subroutine or trap.\n"
                         "Finish\n    Allows you to STEP OUT of a subroutine, it finishes execution of it.\n\n"
                         "Another thing to note if you want to always step over/out a subroutine to select the subroutine label and select mark as blackbox.\n"
                         "If you use step on a JSR/JSRR/TRAP instruction that is blackboxed it will never step into it.\n"
                         "For more information Read The Manual :)\n"
                         , "Notice");
            config->Write("/firsttimesubroutine", "1");
        }
    }

    SetTitle(wxString::Format("%s - %s", base_title, filename.GetFullPath()));

merge:
    std::map<std::string, unsigned short>::const_iterator i;
    std::map<unsigned short, std::string>::const_iterator j;
    for (i = symbol_table.begin(); i != symbol_table.end(); ++i)
    {
        state.symbols[i->first] = i->second;
    }
    for (j = rev_symbol_table.begin(); j != rev_symbol_table.end(); ++j)
    {
        state.rev_symbols[j->first] = j->second;
    }

    UpdateStatus();
    UpdateRegisters();
    UpdateMemory();

    // Save in reload options
    reload_options = opts;

    // Update timestamps
    wxFileName file_loaded(reload_options.file);
    reload_options.file_modification_time = file_loaded.GetModificationTime();
}
コード例 #9
0
/*
 *  Constructs a BezierWidgetBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
BezierWidgetBase::BezierWidgetBase( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    QImage img;
    img.loadFromData( image0_data, sizeof( image0_data ), "PNG" );
    image0 = img;
    if ( !name )
	setName( "bezierwidgetbase" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( QSize( 910, 540 ) );
    setIcon( image0 );
    setMouseTracking( TRUE );
    bezierwidgetbaseLayout = new QGridLayout( this, 1, 1, 11, 6, "bezierwidgetbaseLayout"); 

    layout15 = new QHBoxLayout( 0, 0, 6, "layout15"); 
    spacer5_2 = new QSpacerItem( 170, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout15->addItem( spacer5_2 );

    textLabel3 = new QLabel( this, "textLabel3" );
    textLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) );
    textLabel3->setMinimumSize( QSize( 500, 10 ) );
    textLabel3->setMaximumSize( QSize( 32767, 15 ) );
    layout15->addWidget( textLabel3 );
    spacer5 = new QSpacerItem( 220, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout15->addItem( spacer5 );

    bezierwidgetbaseLayout->addLayout( layout15, 0, 0 );

    layout13 = new QVBoxLayout( 0, 0, 6, "layout13"); 

    qbezier = new Qbezier( this, "qbezier" );
    qbezier->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, qbezier->sizePolicy().hasHeightForWidth() ) );
    qbezier->setMinimumSize( QSize( 0, 220 ) );
    qbezier->setMouseTracking( TRUE );
    layout13->addWidget( qbezier );

    bezierScroll = new QScrollBar( this, "bezierScroll" );
    bezierScroll->setMaxValue( 0 );
    bezierScroll->setLineStep( 1 );
    bezierScroll->setOrientation( QScrollBar::Horizontal );
    layout13->addWidget( bezierScroll );

    bezierwidgetbaseLayout->addLayout( layout13, 2, 0 );

    layout24 = new QHBoxLayout( 0, 0, 6, "layout24"); 

    groupBox1 = new QGroupBox( this, "groupBox1" );
    groupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) );

    textLabel1_2 = new QLabel( groupBox1, "textLabel1_2" );
    textLabel1_2->setGeometry( QRect( 10, 20, 59, 20 ) );

    ChkEnableScroll = new QCheckBox( groupBox1, "ChkEnableScroll" );
    ChkEnableScroll->setGeometry( QRect( 10, 80, 101, 21 ) );

    GridScale = new QLineEdit( groupBox1, "GridScale" );
    GridScale->setEnabled( FALSE );
    GridScale->setGeometry( QRect( 80, 50, 50, 21 ) );

    textLabel1_2_3 = new QLabel( groupBox1, "textLabel1_2_3" );
    textLabel1_2_3->setEnabled( FALSE );
    textLabel1_2_3->setGeometry( QRect( 10, 50, 50, 20 ) );

    FormGridWidth = new QLineEdit( groupBox1, "FormGridWidth" );
    FormGridWidth->setGeometry( QRect( 80, 20, 50, 21 ) );
    layout24->addWidget( groupBox1 );

    groupBox1_2 = new QGroupBox( this, "groupBox1_2" );
    groupBox1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, groupBox1_2->sizePolicy().hasHeightForWidth() ) );

    textLabel1_3 = new QLabel( groupBox1_2, "textLabel1_3" );
    textLabel1_3->setGeometry( QRect( 10, 20, 66, 20 ) );

    textLabel1_2_2 = new QLabel( groupBox1_2, "textLabel1_2_2" );
    textLabel1_2_2->setGeometry( QRect( 10, 50, 50, 20 ) );

    ReverseSeek = new QCheckBox( groupBox1_2, "ReverseSeek" );
    ReverseSeek->setGeometry( QRect( 10, 80, 101, 21 ) );

    FormMinPos = new QLineEdit( groupBox1_2, "FormMinPos" );
    FormMinPos->setGeometry( QRect( 70, 50, 50, 21 ) );

    FormMaxPos = new QLineEdit( groupBox1_2, "FormMaxPos" );
    FormMaxPos->setGeometry( QRect( 70, 20, 50, 21 ) );
    layout24->addWidget( groupBox1_2 );

    groupBox7 = new QGroupBox( this, "groupBox7" );
    groupBox7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, groupBox7->sizePolicy().hasHeightForWidth() ) );
    groupBox7->setMinimumSize( QSize( 478, 0 ) );
    groupBox7->setColumnLayout(0, Qt::Vertical );
    groupBox7->layout()->setSpacing( 6 );
    groupBox7->layout()->setMargin( 11 );
    groupBox7Layout = new QGridLayout( groupBox7->layout() );
    groupBox7Layout->setAlignment( Qt::AlignTop );

    splitter1 = new QSplitter( groupBox7, "splitter1" );
    splitter1->setOrientation( QSplitter::Horizontal );

    listRegOut = new QListView( splitter1, "listRegOut" );
    listRegOut->addColumn( tr( "Td" ) );
    listRegOut->addColumn( tr( "Pos" ) );
    listRegOut->addColumn( tr( "Tin" ) );
    listRegOut->addColumn( tr( "Tout" ) );
    listRegOut->setMaximumSize( QSize( 500, 32767 ) );
    listRegOut->setResizeMode( QListView::AllColumns );

    listRegOutHex = new QListView( splitter1, "listRegOutHex" );
    listRegOutHex->addColumn( tr( "Td" ) );
    listRegOutHex->addColumn( tr( "Pos" ) );
    listRegOutHex->addColumn( tr( "Tin" ) );
    listRegOutHex->addColumn( tr( "Tout" ) );
    listRegOutHex->setResizeMode( QListView::AllColumns );

    groupBox7Layout->addMultiCellWidget( splitter1, 0, 1, 0, 0 );

    btnOSSend = new QPushButton( groupBox7, "btnOSSend" );
    btnOSSend->setMaximumSize( QSize( 60, 32767 ) );

    groupBox7Layout->addWidget( btnOSSend, 1, 1 );

    servoList = new QListView( groupBox7, "servoList" );
    servoList->addColumn( tr( "sv" ) );
    servoList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, servoList->sizePolicy().hasHeightForWidth() ) );
    servoList->setMinimumSize( QSize( 60, 60 ) );
    servoList->setMaximumSize( QSize( 60, 66 ) );
    servoList->setVScrollBarMode( QListView::AlwaysOn );
    servoList->setHScrollBarMode( QListView::AlwaysOff );

    groupBox7Layout->addWidget( servoList, 0, 1 );
    layout24->addWidget( groupBox7 );
    spacer3_2 = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout24->addItem( spacer3_2 );

    ServoSim = new QServo( this, "ServoSim" );
    ServoSim->setMinimumSize( QSize( 110, 110 ) );
    ServoSim->setMaximumSize( QSize( 110, 110 ) );
    layout24->addWidget( ServoSim );

    bezierwidgetbaseLayout->addLayout( layout24, 1, 0 );

    layout11 = new QHBoxLayout( 0, 0, 6, "layout11"); 

    layout19 = new QHBoxLayout( 0, 0, 6, "layout19"); 

    layout18 = new QVBoxLayout( 0, 0, 6, "layout18"); 

    textLabel2_2 = new QLabel( this, "textLabel2_2" );
    textLabel2_2->setMinimumSize( QSize( 75, 16 ) );
    layout18->addWidget( textLabel2_2 );

    label = new QLabel( this, "label" );
    label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, label->sizePolicy().hasHeightForWidth() ) );
    label->setMinimumSize( QSize( 75, 16 ) );
    label->setMaximumSize( QSize( 50, 32767 ) );
    layout18->addWidget( label );
    layout19->addLayout( layout18 );

    layout17 = new QVBoxLayout( 0, 0, 6, "layout17"); 

    textLabel2 = new QLabel( this, "textLabel2" );
    textLabel2->setMinimumSize( QSize( 75, 16 ) );
    layout17->addWidget( textLabel2 );

    FormTimePos = new QLabel( this, "FormTimePos" );
    FormTimePos->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, FormTimePos->sizePolicy().hasHeightForWidth() ) );
    FormTimePos->setMinimumSize( QSize( 75, 16 ) );
    FormTimePos->setMaximumSize( QSize( 50, 32767 ) );
    layout17->addWidget( FormTimePos );
    layout19->addLayout( layout17 );

    layout16 = new QVBoxLayout( 0, 0, 6, "layout16"); 

    textLabel2_3 = new QLabel( this, "textLabel2_3" );
    textLabel2_3->setMinimumSize( QSize( 75, 16 ) );
    textLabel2_3->setAlignment( int( QLabel::AlignCenter ) );
    layout16->addWidget( textLabel2_3 );

    FormMotorPos = new QLabel( this, "FormMotorPos" );
    FormMotorPos->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, FormMotorPos->sizePolicy().hasHeightForWidth() ) );
    FormMotorPos->setMinimumSize( QSize( 75, 16 ) );
    FormMotorPos->setMaximumSize( QSize( 50, 32767 ) );
    layout16->addWidget( FormMotorPos );
    layout19->addLayout( layout16 );

    layout15_2 = new QVBoxLayout( 0, 0, 6, "layout15_2"); 

    textLabel2_3_2 = new QLabel( this, "textLabel2_3_2" );
    textLabel2_3_2->setMinimumSize( QSize( 75, 16 ) );
    textLabel2_3_2->setAlignment( int( QLabel::AlignCenter ) );
    layout15_2->addWidget( textLabel2_3_2 );

    FormMotorSpeed = new QLabel( this, "FormMotorSpeed" );
    FormMotorSpeed->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, FormMotorSpeed->sizePolicy().hasHeightForWidth() ) );
    FormMotorSpeed->setMinimumSize( QSize( 75, 16 ) );
    FormMotorSpeed->setMaximumSize( QSize( 50, 32767 ) );
    layout15_2->addWidget( FormMotorSpeed );
    layout19->addLayout( layout15_2 );
    layout11->addLayout( layout19 );

    layout10 = new QGridLayout( 0, 1, 1, 0, 6, "layout10"); 

    textLabel2_4 = new QLabel( this, "textLabel2_4" );

    layout10->addWidget( textLabel2_4, 0, 1 );

    textLabel2_4_2 = new QLabel( this, "textLabel2_4_2" );
    textLabel2_4_2->setMinimumSize( QSize( 40, 0 ) );
    textLabel2_4_2->setMaximumSize( QSize( 40, 32767 ) );

    layout10->addWidget( textLabel2_4_2, 1, 1 );

    textLabel1_4 = new QLabel( this, "textLabel1_4" );
    textLabel1_4->setMinimumSize( QSize( 15, 15 ) );
    textLabel1_4->setMaximumSize( QSize( 15, 15 ) );
    textLabel1_4->setPaletteBackgroundColor( QColor( 0, 170, 0 ) );

    layout10->addWidget( textLabel1_4, 1, 0 );

    textLabel1 = new QLabel( this, "textLabel1" );
    textLabel1->setMinimumSize( QSize( 15, 15 ) );
    textLabel1->setMaximumSize( QSize( 15, 15 ) );
    textLabel1->setPaletteBackgroundColor( QColor( 255, 0, 0 ) );

    layout10->addWidget( textLabel1, 0, 0 );
    layout11->addLayout( layout10 );
    spacer8 = new QSpacerItem( 30, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout11->addItem( spacer8 );

    groupBox4 = new QGroupBox( this, "groupBox4" );
    groupBox4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, groupBox4->sizePolicy().hasHeightForWidth() ) );
    groupBox4->setMinimumSize( QSize( 10, 45 ) );
    groupBox4->setMaximumSize( QSize( 32767, 100 ) );

    FormGridDel = new QPushButton( groupBox4, "FormGridDel" );
    FormGridDel->setGeometry( QRect( 70, 20, 50, 21 ) );

    FormGridAdd = new QPushButton( groupBox4, "FormGridAdd" );
    FormGridAdd->setGeometry( QRect( 10, 20, 50, 21 ) );
    layout11->addWidget( groupBox4 );

    groupBox5 = new QGroupBox( this, "groupBox5" );
    groupBox5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, groupBox5->sizePolicy().hasHeightForWidth() ) );
    groupBox5->setMinimumSize( QSize( 10, 45 ) );

    FormBtnSimStart = new QPushButton( groupBox5, "FormBtnSimStart" );
    FormBtnSimStart->setGeometry( QRect( 11, 20, 61, 20 ) );

    FormBtnSimPause = new QPushButton( groupBox5, "FormBtnSimPause" );
    FormBtnSimPause->setGeometry( QRect( 193, 20, 66, 20 ) );

    ServoSimLoop = new QCheckBox( groupBox5, "ServoSimLoop" );
    ServoSimLoop->setGeometry( QRect( 76, 20, 50, 20 ) );

    FormBtnSimStop = new QPushButton( groupBox5, "FormBtnSimStop" );
    FormBtnSimStop->setGeometry( QRect( 128, 20, 59, 20 ) );
    layout11->addWidget( groupBox5 );

    groupBox6 = new QGroupBox( this, "groupBox6" );
    groupBox6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, groupBox6->sizePolicy().hasHeightForWidth() ) );
    groupBox6->setMinimumSize( QSize( 10, 45 ) );
    groupBox6->setMaximumSize( QSize( 55, 32767 ) );

    lblDebug = new QLabel( groupBox6, "lblDebug" );
    lblDebug->setGeometry( QRect( 10, 21, 40, 20 ) );
    layout11->addWidget( groupBox6 );

    bezierwidgetbaseLayout->addLayout( layout11, 3, 0 );
    languageChange();
    resize( QSize(910, 540).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( FormGridWidth, SIGNAL( textChanged(const QString&) ), this, SLOT( gridTimeChange(const QString&) ) );
    connect( FormMaxPos, SIGNAL( textChanged(const QString&) ), this, SLOT( servoMaxPosChange(const QString&) ) );
    connect( FormMinPos, SIGNAL( textChanged(const QString&) ), this, SLOT( servoMinPosChange(const QString&) ) );
    connect( FormBtnSimStart, SIGNAL( clicked() ), this, SLOT( BtnSimStart() ) );
    connect( FormBtnSimStop, SIGNAL( clicked() ), this, SLOT( BtnSimStop() ) );
    connect( FormBtnSimPause, SIGNAL( clicked() ), this, SLOT( BtnSimPause() ) );
    connect( FormGridAdd, SIGNAL( clicked() ), this, SLOT( BtnGridAdd() ) );
    connect( FormGridDel, SIGNAL( clicked() ), this, SLOT( BtnGridDel() ) );
    connect( bezierScroll, SIGNAL( valueChanged(int) ), this, SLOT( FormBezierScroll(int) ) );
    connect( qbezier, SIGNAL( setXY(int,int) ), this, SLOT( setLabelXY(int,int) ) );
    connect( qbezier, SIGNAL( calcparams() ), this, SLOT( UpdateRegisters() ) );
    connect( ChkEnableScroll, SIGNAL( toggled(bool) ), this, SLOT( enableScroll(bool) ) );
    connect( qbezier, SIGNAL( setInfo(QString&) ), this, SLOT( infoUpdate(QString&) ) );
    connect( btnOSSend, SIGNAL( clicked() ), this, SLOT( BtnOSsendCurve() ) );
    connect( servoList, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( servoChanged(QListViewItem*) ) );

    // tab order
    setTabOrder( FormGridWidth, FormBtnSimStart );
    setTabOrder( FormBtnSimStart, ChkEnableScroll );
    setTabOrder( ChkEnableScroll, GridScale );
    setTabOrder( GridScale, ReverseSeek );
    setTabOrder( ReverseSeek, FormMinPos );
    setTabOrder( FormMinPos, FormMaxPos );
    setTabOrder( FormMaxPos, listRegOut );
    setTabOrder( listRegOut, FormGridAdd );
    setTabOrder( FormGridAdd, FormGridDel );
    setTabOrder( FormGridDel, FormBtnSimStop );
    setTabOrder( FormBtnSimStop, FormBtnSimPause );
}