leocad/common/lc_category.h

25 lines
803 B
C
Raw Normal View History

#pragma once
2013-08-09 04:57:18 +00:00
2013-08-15 23:43:18 +00:00
#include "lc_array.h"
2013-08-09 04:57:18 +00:00
struct lcLibraryCategory
{
2017-02-08 09:41:48 -08:00
QString Name;
QByteArray Keywords;
2013-08-09 04:57:18 +00:00
};
2013-08-15 23:43:18 +00:00
extern lcArray<lcLibraryCategory> gCategories;
2013-08-09 04:57:18 +00:00
void lcResetDefaultCategories();
void lcLoadDefaultCategories(bool BuiltInLibrary = false);
void lcSaveDefaultCategories();
2013-08-15 23:43:18 +00:00
void lcResetCategories(lcArray<lcLibraryCategory>& Categories, bool BuiltInLibrary = false);
bool lcLoadCategories(const QString& FileName, lcArray<lcLibraryCategory>& Categories);
bool lcLoadCategories(const QByteArray& Buffer, lcArray<lcLibraryCategory>& Categories);
bool lcSaveCategories(const QString& FileName, const lcArray<lcLibraryCategory>& Categories);
2016-02-16 23:11:52 +00:00
bool lcSaveCategories(QTextStream& Stream, const lcArray<lcLibraryCategory>& Categories);
2013-08-09 04:57:18 +00:00
2017-02-07 18:55:54 -08:00
bool lcMatchCategory(const char* PieceName, const char* Expression);