2010-11-17 21:47:27 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dialog_build_BOM.h
|
|
|
|
// Copyright: GNU license
|
|
|
|
// Licence:
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _DIALOG_BUILD_BOM_H_
|
|
|
|
#define _DIALOG_BUILD_BOM_H_
|
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <dialog_build_BOM_base.h>
|
2010-11-17 21:47:27 +00:00
|
|
|
|
|
|
|
|
2011-01-21 19:30:59 +00:00
|
|
|
class EDA_DRAW_FRAME;
|
2010-11-17 21:47:27 +00:00
|
|
|
class SCH_COMPONENT;
|
|
|
|
class wxConfig;
|
|
|
|
|
|
|
|
|
|
|
|
class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE
|
|
|
|
{
|
|
|
|
private:
|
2011-01-21 19:30:59 +00:00
|
|
|
EDA_DRAW_FRAME* m_Parent;
|
|
|
|
wxConfig* m_Config;
|
2012-04-13 18:44:02 +00:00
|
|
|
wxString m_ListFileName; // The full filename of the file report.
|
2010-11-17 21:47:27 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void OnRadioboxSelectFormatSelected( wxCommandEvent& event );
|
|
|
|
void OnOkClick( wxCommandEvent& event );
|
|
|
|
void OnCancelClick( wxCommandEvent& event );
|
|
|
|
|
|
|
|
void SavePreferences();
|
|
|
|
void Init();
|
|
|
|
void Create_BOM_Lists( int aTypeFile,
|
|
|
|
bool aIncludeSubComponents,
|
|
|
|
char aExportSeparatorSymbol,
|
|
|
|
bool aRunBrowser );
|
|
|
|
|
2012-04-13 18:44:02 +00:00
|
|
|
void GenereListeOfItems( bool aIncludeSubComponents );
|
2010-11-17 21:47:27 +00:00
|
|
|
|
|
|
|
/**
|
2012-04-13 18:44:02 +00:00
|
|
|
* Function CreateExportList
|
2010-11-17 21:47:27 +00:00
|
|
|
* prints a list of components, in a form which can be imported by a
|
|
|
|
* spreadsheet. Form is:
|
2012-04-13 18:44:02 +00:00
|
|
|
* reference; cmp value; \<footprint\>; \<field1\>; ...;
|
|
|
|
* Components are sorted by reference
|
2010-11-17 21:47:27 +00:00
|
|
|
*/
|
2012-04-13 18:44:02 +00:00
|
|
|
void CreateExportList( bool aIncludeSubComponents );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function CreatePartsList
|
|
|
|
* prints a list of components, in a form which can be imported by a spreadsheet.
|
|
|
|
* components having the same value and the same footprint
|
|
|
|
* are grouped on the same line
|
|
|
|
* Form is:
|
|
|
|
* value; number of components; list of references; \<footprint\>; \<field1\>; ...;
|
|
|
|
* list is sorted by values
|
|
|
|
*/
|
|
|
|
void CreatePartsList();
|
2010-11-17 21:47:27 +00:00
|
|
|
|
2011-01-01 17:28:21 +00:00
|
|
|
int PrintComponentsListByRef( FILE* f, SCH_REFERENCE_LIST& aList,
|
2010-11-17 21:47:27 +00:00
|
|
|
bool CompactForm, bool aIncludeSubComponents );
|
|
|
|
|
2011-01-01 17:28:21 +00:00
|
|
|
int PrintComponentsListByVal( FILE* f, SCH_REFERENCE_LIST& aList,
|
2010-11-17 21:47:27 +00:00
|
|
|
bool aIncludeSubComponents );
|
|
|
|
|
2011-01-01 17:28:21 +00:00
|
|
|
int PrintComponentsListByPart( FILE* f, SCH_REFERENCE_LIST& aList,
|
2010-11-17 21:47:27 +00:00
|
|
|
bool aIncludeSubComponents );
|
|
|
|
|
2012-01-22 17:20:22 +00:00
|
|
|
wxString PrintFieldData( SCH_COMPONENT* DrawLibItem, bool CompactForm = false );
|
2010-11-17 21:47:27 +00:00
|
|
|
|
|
|
|
bool IsFieldChecked( int aFieldId );
|
|
|
|
|
|
|
|
public:
|
2011-01-21 19:30:59 +00:00
|
|
|
DIALOG_BUILD_BOM( EDA_DRAW_FRAME* parent );
|
2010-11-17 21:47:27 +00:00
|
|
|
|
|
|
|
// ~DIALOG_BUILD_BOM() {};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _DIALOG_BUILD_BOM_H_
|