KiCad PCB EDA Suite
project_template.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2012 Brian Sidebotham <brian.sidebotham@gmail.com>
5  * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
104 #ifndef PROJECT_TEMPLATE_H
105 #define PROJECT_TEMPLATE_H
106 
107 
108 #include <vector>
109 
110 #include <wx/filename.h>
111 #include <wx/intl.h>
112 
113 
114 class wxBitmap;
115 
121 #define METADIR wxT("meta")
122 
123 
129 #define METAFILE_INFO_HTML wxT("info.html")
130 
131 
137 #define METAFILE_ICON wxT("icon.png")
138 
146 private:
147 protected:
148  wxFileName templateBasePath;
149  wxFileName templateMetaPath;
152  wxBitmap* metaIcon;
153  wxString title;
154 
155 public:
156 
163  PROJECT_TEMPLATE( const wxString& aPath );
164 
169 
175  wxString GetPrjDirName();
176 
181  wxFileName GetHtmlFile();
182 
187  bool CreateProject( wxFileName& aNewProjectPath );
188 
193  wxBitmap* GetIcon();
194 
198  wxString* GetTitle();
199 
204  std::vector<wxFileName> GetFileList();
205 };
206 
207 #endif
std::vector< wxFileName > GetFileList()
Get a vector list of filenames for the template.
wxFileName templateMetaHtmlFile
wxFileName GetHtmlFile()
Get the full Html filename for the project template.
wxFileName templateBasePath
A class which provides project template functionality.
wxFileName templateMetaIconFile
PROJECT_TEMPLATE(const wxString &aPath)
Create a new project instance from aPath.
wxString * GetTitle()
Get the title of the project (extracted from the html title tag)
wxString GetPrjDirName()
Get the dir name of the project template (i.e.
bool CreateProject(wxFileName &aNewProjectPath)
Copies and renames all template files to create a new project.
wxFileName templateMetaPath
~PROJECT_TEMPLATE()
Non-virtual destructor (so no dervied classes)
wxBitmap * GetIcon()
Get the 64px^2 icon for the project template.