pnlanabase.hpp
来自「gspiceui电子CAD仿真程序.用于电路参数模拟仿真」· HPP 代码 · 共 156 行
HPP
156 行
//*****************************************************************************// PnlAnaBase.hpp *// ---------------- *// Description : This class derives from the wxPanel class and provides a *// base class for all analysis panel classes. *// Started : 26/04/2004 *// Last Update : 14/07/2005 *// Copyright : (C) 2004 by MSWaters *// Email : M.Waters@bom.gov.au *//*****************************************************************************//*****************************************************************************// *// This program is free software; you can redistribute it and/or modify *// it under the terms of the GNU General Public License as published by *// the Free Software Foundation; either version 2 of the License, or *// (at your option) any later version. *// *//*****************************************************************************#ifndef PNLANABASE_HPP#define PNLANABASE_HPP// System Includes#include <iostream>// wxWindows Library Includes#include <wx/wx.h>#include <wx/choice.h>// Application Includes#include "PnlValue.hpp"#include "NetList.hpp"#include "Simulation.hpp"// Local Constant Declarations//*****************************************************************************class PnlAnaBase : public wxPanel{ private: wxString m_osError; // Error message protected: // Sweep settings wxStaticBox m_oSbxSwpPars; PnlValue m_oPnlStart; PnlValue m_oPnlStop; PnlValue m_oPnlStep; // Input source, value and units wxStaticBox m_oSbxSrc; wxChoice m_oChoSrcCpnt; PnlValue m_oPnlSrcLvl; // Parameters to be calculated wxStaticBox m_oSbxCalcPars; wxCheckBox m_oCbxVoltage; wxCheckBox m_oCbxCurrent; wxCheckBox m_oCbxPower; wxCheckBox m_oCbxResist; // Complex Parts wxStaticBox m_oSbxCpxPrt; wxCheckBox m_oCbxMag; wxCheckBox m_oCbxPhase; wxCheckBox m_oCbxReal; wxCheckBox m_oCbxImag; wxCheckBox m_oCbxMagDb; // Analysis temperature wxStaticBox m_oSbxTemp; PnlValue m_oPnlTemp; // The analysis type of the panel Simulation::eAnaType m_eType; // Functions to create the display objects void CreateBase ( void ); void CreateSrc ( void ); void CreateCpxPrt( void ); void CreateTemp ( void ); void SetSrcCpnt( Simulation & roSim ); void SetSrcUType( void ); public: PnlAnaBase( wxWindow * poWin ); ~PnlAnaBase( ); bool bSetType( Simulation::eAnaType eAnaType ); Simulation::eAnaType eGetType( void ) { return( m_eType ); } bool bClear( void ); bool bIsCreatedBase( void ) { return( m_oSbxSwpPars.GetParent( )!=NULL ? TRUE : FALSE ); } bool bIsCreatedSrc( void ) { return( m_oSbxSrc .GetParent( )!=NULL ? TRUE : FALSE ); } bool bIsCreatedCpxPrt( void ) { return( m_oSbxCpxPrt .GetParent( )!=NULL ? TRUE : FALSE ); } bool bIsCreatedTemp( void ) { return( m_oPnlTemp .GetParent( )!=NULL ? TRUE : FALSE ); } bool bIsOk( void ) { return( m_osError.IsEmpty( ) ); } void SetError( const wxChar * psError ) { if( bIsOk() ) m_osError=psError; } const wxChar * psGetError( void ) { return( m_osError.c_str( ) ); } bool bLoad ( Simulation & roSim ); bool bReload( Simulation & roSim ); bool bSave ( Simulation & roSim ); friend class FrmMain; // In order to be able to react to a menu command, it must be given a // unique identifier such as a const or an enum. enum ePnlItemID { ID_PNL_START = 1, ID_PNL_STOP, ID_PNL_STEP, ID_CHO_SRCCPNT, ID_PNL_SRCLVL, ID_CBX_MAG, ID_CBX_PHASE, ID_CBX_REAL, ID_CBX_IMAG, ID_CBX_MAGDB, ID_CBX_VOLT, ID_CBX_CURR, ID_CBX_PWR, ID_CBX_RES, ID_PNL_TEMP, ID_UNUSED, // Assigned to controls for which events are not used ID_FST = ID_PNL_START, ID_LST = ID_PNL_TEMP };};//*****************************************************************************#endif // PNLANABASE_HPP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?