From 029061b4c743ae6747ac4ad68de549b5330cdca1 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Thu, 23 May 2013 14:24:58 +0000 Subject: [PATCH] make 1600 default and re-arranged to fit 800x600 netbook layout git-svn-id: https://svn.code.sf.net/p/freetel/code@1267 01035d8c-6547-0410-b346-abe4f91aad63 --- fdmdv2/src/fdmdv2_main.cpp | 4 +- fdmdv2/src/topFrame.cpp | 91 ++++++++++++++++++++------------------ 2 files changed, 49 insertions(+), 46 deletions(-) diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index 53463874..211900fc 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -198,8 +198,8 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) // restore frame position and size int x = pConfig->Read(wxT("/MainFrame/top"), 20); int y = pConfig->Read(wxT("/MainFrame/left"), 20); - int w = pConfig->Read(wxT("/MainFrame/width"), 550); - int h = pConfig->Read(wxT("/MainFrame/height"), 400); + int w = pConfig->Read(wxT("/MainFrame/width"), 800); + int h = pConfig->Read(wxT("/MainFrame/height"), 550); // note: run DebugView program to see this message under windows //wxLogDebug("x = %d y = %d w = %d h = %d\n", x,y,w,h); diff --git a/fdmdv2/src/topFrame.cpp b/fdmdv2/src/topFrame.cpp index 3d9e20fa..3ac60310 100644 --- a/fdmdv2/src/topFrame.cpp +++ b/fdmdv2/src/topFrame.cpp @@ -135,6 +135,36 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const leftSizer->Add(snrSizer, 2, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 1); + //------------------------------ + // Sync Indicator box + //------------------------------ + wxStaticBoxSizer* sbSizer3_33; + sbSizer3_33 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Sync")), wxVERTICAL); + + m_rbSync = new wxRadioButton( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); + m_rbSync->SetForegroundColour( wxColour( 255, 0, 0 ) ); + sbSizer3_33->Add(m_rbSync, 0, wxALIGN_CENTER|wxALL, 1); + leftSizer->Add(sbSizer3_33,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + + //------------------------------ + // BER Frames box + //------------------------------ + + wxStaticBoxSizer* sbSizer_ber; + sbSizer_ber = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Bit Error Rate")), wxVERTICAL); + + m_BtnBerReset = new wxButton(this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, 0); + sbSizer_ber->Add(m_BtnBerReset, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1); + + m_textBits = new wxStaticText(this, wxID_ANY, wxT("Bits...: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); + sbSizer_ber->Add(m_textBits, 0, wxALIGN_LEFT, 1); + m_textErrors = new wxStaticText(this, wxID_ANY, wxT("Errors: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); + sbSizer_ber->Add(m_textErrors, 0, wxALIGN_LEFT, 1); + m_textBER = new wxStaticText(this, wxID_ANY, wxT("BER...: 0.0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); + sbSizer_ber->Add(m_textBER, 0, wxALIGN_LEFT, 1); + + leftSizer->Add(sbSizer_ber,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + //------------------------------ // Signal Level(vert. bargraph) //------------------------------ @@ -251,50 +281,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const sbSizer3->Add(m_ckboxSQ, 0, wxALIGN_CENTER_HORIZONTAL, 0); rightSizer->Add(sbSizer3, 2, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 0); - //------------------------------ - // Sync Indicator box - //------------------------------ - wxStaticBoxSizer* sbSizer3_33; - sbSizer3_33 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Sync")), wxVERTICAL); - - m_rbSync = new wxRadioButton( this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); - m_rbSync->SetForegroundColour( wxColour( 255, 0, 0 ) ); - sbSizer3_33->Add(m_rbSync, 0, wxALIGN_CENTER|wxALL, 1); - - rightSizer->Add(sbSizer3_33,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); - - /* new --- */ - - //------------------------------ - // Test Frames box - //------------------------------ - - wxStaticBoxSizer* sbSizer_testFrames; - sbSizer_testFrames = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Test Frames")), wxVERTICAL); - - m_ckboxTestFrame = new wxCheckBox(this, wxID_ANY, _("Enable"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE); - sbSizer_testFrames->Add(m_ckboxTestFrame, 0, wxALIGN_LEFT, 0); - - rightSizer->Add(sbSizer_testFrames,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); - - //------------------------------ - // BER Frames box - //------------------------------ - - wxStaticBoxSizer* sbSizer_ber; - sbSizer_ber = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Bit Error Rate")), wxVERTICAL); - - m_BtnBerReset = new wxButton(this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, 0); - sbSizer_ber->Add(m_BtnBerReset, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1); - - m_textBits = new wxStaticText(this, wxID_ANY, wxT("Bits...: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); - sbSizer_ber->Add(m_textBits, 0, wxALIGN_LEFT, 1); - m_textErrors = new wxStaticText(this, wxID_ANY, wxT("Errors: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); - sbSizer_ber->Add(m_textErrors, 0, wxALIGN_LEFT, 1); - m_textBER = new wxStaticText(this, wxID_ANY, wxT("BER...: 0.0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); - sbSizer_ber->Add(m_textBER, 0, wxALIGN_LEFT, 1); - - rightSizer->Add(sbSizer_ber,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + //rightSizer->Add(sbSizer3_33,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); /* new --- */ @@ -312,6 +299,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const #endif m_rb1600 = new wxRadioButton( this, wxID_ANY, wxT("1600"), wxDefaultPosition, wxDefaultSize, 0); sbSizer_mode->Add(m_rb1600, 0, wxALIGN_LEFT|wxALL, 1); + m_rb1600->SetValue(true); m_rb1600Wide = new wxRadioButton( this, wxID_ANY, wxT("1600 Wide"), wxDefaultPosition, wxDefaultSize, 0); sbSizer_mode->Add(m_rb1600Wide, 0, wxALIGN_LEFT|wxALL, 1); #ifdef DISABLED_FEATURE @@ -321,6 +309,21 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const rightSizer->Add(sbSizer_mode,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + /* new --- */ + + //------------------------------ + // Test Frames box + //------------------------------ + + wxStaticBoxSizer* sbSizer_testFrames; + sbSizer_testFrames = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Test Frames")), wxVERTICAL); + + m_ckboxTestFrame = new wxCheckBox(this, wxID_ANY, _("Enable"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE); + sbSizer_testFrames->Add(m_ckboxTestFrame, 0, wxALIGN_LEFT, 0); + + rightSizer->Add(sbSizer_testFrames,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + + //===================================================== // Control Toggles box //===================================================== -- 2.25.1