Skip to content

Commit

Permalink
Added bitmap to engineering panel
Browse files Browse the repository at this point in the history
  • Loading branch information
martim01 committed Mar 16, 2020
1 parent 0bdf4a2 commit 6846a4a
Show file tree
Hide file tree
Showing 12 changed files with 650 additions and 432 deletions.
52 changes: 41 additions & 11 deletions pam2/dlgEngineering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
//*)

//(*IdInit(dlgEngineering)
const long dlgEngineering::ID_M_PLBL1 = wxNewId();
const long dlgEngineering::ID_M_PBTN5 = wxNewId();
const long dlgEngineering::ID_M_PBTN4 = wxNewId();
const long dlgEngineering::ID_M_PBTN3 = wxNewId();
const long dlgEngineering::ID_M_PBTN2 = wxNewId();
const long dlgEngineering::ID_M_PBTN1 = wxNewId();
const long dlgEngineering::ID_PANEL1 = wxNewId();
//*)

BEGIN_EVENT_TABLE(dlgEngineering,wxDialog)
Expand All @@ -28,24 +31,38 @@ dlgEngineering::dlgEngineering(wxWindow* parent,wxWindowID id,const wxPoint& pos
SetBackgroundColour(wxColour(128,0,0));
wxFont thisFont(14,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,_T("Arial"),wxFONTENCODING_DEFAULT);
SetFont(thisFont);
m_pLbl1 = new wmLabel(this, ID_M_PLBL1, _("PAM Engineering Menu"), wxPoint(0,0), wxSize(780,50), 0, _T("ID_M_PLBL1"));
m_pLbl1->SetBorderState(uiRect::BORDER_NONE);
m_pLbl1->GetUiRect().SetGradient(0);
m_pLbl1->SetForegroundColour(wxColour(255,255,255));
wxFont m_pLbl1Font(18,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,_T("Arial"),wxFONTENCODING_DEFAULT);
m_pLbl1->SetFont(m_pLbl1Font);
m_pbtnReset = new wmButton(this, ID_M_PBTN2, _("Reset Settings"), wxPoint(350,100), wxSize(100,60), 0, wxDefaultValidator, _T("ID_M_PBTN2"));
m_pbtnReset->Disable();
m_pBackground = new wxBitmapPanel(this, ID_PANEL1, wxPoint(0,0), wxSize(800,480), wxTAB_TRAVERSAL, _T("ID_PANEL1"));
m_pbtnSoundcard = new wmButton(m_pBackground, ID_M_PBTN5, _("Set Soundcard"), wxPoint(10,410), wxSize(100,60), 0, wxDefaultValidator, _T("ID_M_PBTN5"));
m_pbtnSoundcard->SetBackgroundColour(wxColour(0,128,64));
wxFont m_pbtnSoundcardFont(12,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,_T("Arial"),wxFONTENCODING_DEFAULT);
m_pbtnSoundcard->SetFont(m_pbtnSoundcardFont);
m_pbtnConfig = new wmButton(m_pBackground, ID_M_PBTN4, _("Raspi Config"), wxPoint(120,410), wxSize(100,60), 0, wxDefaultValidator, _T("ID_M_PBTN4"));
m_pbtnConfig->Hide();
m_pbtnConfig->SetBackgroundColour(wxColour(0,128,64));
wxFont m_pbtnConfigFont(12,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,_T("Arial"),wxFONTENCODING_DEFAULT);
m_pbtnConfig->SetFont(m_pbtnConfigFont);
m_pbtnFilesystem = new wmButton(m_pBackground, ID_M_PBTN3, _("Expand Filesystem"), wxPoint(230,410), wxSize(100,60), 0, wxDefaultValidator, _T("ID_M_PBTN3"));
m_pbtnFilesystem->Hide();
m_pbtnFilesystem->SetBackgroundColour(wxColour(0,128,64));
wxFont m_pbtnFilesystemFont(12,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,_T("Arial"),wxFONTENCODING_DEFAULT);
m_pbtnFilesystem->SetFont(m_pbtnFilesystemFont);
m_pbtnReset = new wmButton(m_pBackground, ID_M_PBTN2, _("Reset Settings"), wxPoint(340,410), wxSize(100,60), 0, wxDefaultValidator, _T("ID_M_PBTN2"));
m_pbtnReset->SetBackgroundColour(wxColour(0,128,64));
wxFont m_pbtnResetFont(12,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,_T("Arial"),wxFONTENCODING_DEFAULT);
m_pbtnReset->SetFont(m_pbtnResetFont);
m_pbtnClose = new wmButton(this, ID_M_PBTN1, _("Close"), wxPoint(350,410), wxSize(100,60), 0, wxDefaultValidator, _T("ID_M_PBTN1"));
m_pbtnClose->Disable();
m_pbtnClose = new wmButton(m_pBackground, ID_M_PBTN1, _("Close"), wxPoint(690,410), wxSize(100,60), 0, wxDefaultValidator, _T("ID_M_PBTN1"));
m_pbtnClose->SetBackgroundColour(wxColour(0,128,64));
wxFont m_pbtnCloseFont(12,wxFONTFAMILY_SWISS,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,_T("Arial"),wxFONTENCODING_DEFAULT);
m_pbtnClose->SetFont(m_pbtnCloseFont);

Connect(ID_M_PBTN5,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&dlgEngineering::OnbtnSoundcardClick);
Connect(ID_M_PBTN4,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&dlgEngineering::OnbtnConfigClick);
Connect(ID_M_PBTN3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&dlgEngineering::OnbtnFilesystemClick);
Connect(ID_M_PBTN2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&dlgEngineering::OnbtnResetClick);
Connect(ID_M_PBTN1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&dlgEngineering::OnbtnCloseClick);
//*)
m_pbtnSoundcard->Hide();
m_pBackground->SetBackgroundBitmap(wxBitmap(splash_xpm));
m_timerClose.SetOwner(this, wxNewId());
m_timerClose.Start(5000,true);
Connect(m_timerClose.GetId(), wxEVT_TIMER, (wxObjectEventFunction)&dlgEngineering::OnTimeClose);
Expand All @@ -72,3 +89,16 @@ void dlgEngineering::OnbtnResetClick(wxCommandEvent& event)
{
Settings::Get().ResetFile();
}


void dlgEngineering::OnbtnSoundcardClick(wxCommandEvent& event)
{
}

void dlgEngineering::OnbtnConfigClick(wxCommandEvent& event)
{
}

void dlgEngineering::OnbtnFilesystemClick(wxCommandEvent& event)
{
}
18 changes: 14 additions & 4 deletions pam2/dlgEngineering.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

//(*Headers(dlgEngineering)
#include "wmbutton.h"
#include "wmlabel.h"
#include <wx/dialog.h>
#include <wx/panel.h>
//*)
#include <wx/timer.h>
#include "wxbitmappanel.h"

class dlgEngineering: public wxDialog
{
Expand All @@ -17,23 +18,32 @@ class dlgEngineering: public wxDialog

//(*Declarations(dlgEngineering)
wmButton* m_pbtnClose;
wmButton* m_pbtnConfig;
wmButton* m_pbtnFilesystem;
wmButton* m_pbtnReset;
wmLabel* m_pLbl1;
wmButton* m_pbtnSoundcard;
wxBitmapPanel* m_pBackground;
//*)

protected:

//(*Identifiers(dlgEngineering)
static const long ID_M_PLBL1;
static const long ID_M_PBTN5;
static const long ID_M_PBTN4;
static const long ID_M_PBTN3;
static const long ID_M_PBTN2;
static const long ID_M_PBTN1;
static const long ID_PANEL1;
//*)

private:

//(*Handlers(dlgEngineering)
void OnbtnCloseClick(wxCommandEvent& event);
void OnbtnResetClick(wxCommandEvent& event);
void OnInit(wxInitDialogEvent& event);
void OnbtnSoundcardClick(wxCommandEvent& event);
void OnbtnConfigClick(wxCommandEvent& event);
void OnbtnFilesystemClick(wxCommandEvent& event);
//*)

void OnTimeClose(wxTimerEvent& event);
Expand Down
Loading

0 comments on commit 6846a4a

Please sign in to comment.