src/primitives.h

changeset 794
c254ddc6618b
parent 784
f82ab4d3c7b4
child 844
11587d419d2f
--- a/src/primitives.h	Wed Jun 04 02:08:18 2014 +0300
+++ b/src/primitives.h	Thu Jun 05 23:18:13 2014 +0300
@@ -25,10 +25,11 @@
 class LDDocument;
 class Ui_MakePrimUI;
 class PrimitiveCategory;
+
 struct Primitive
 {
-	QString				name,
-						title;
+	QString				name;
+	QString				title;
 	PrimitiveCategory*	category;
 };
 
@@ -37,32 +38,29 @@
 	Q_OBJECT
 	PROPERTY (public, QString, name, setName, STOCK_WRITE)
 
-	public:
-		enum RegexType
-		{
-			EFilenameRegex,
-			ETitleRegex
-		};
+public:
+	enum RegexType
+	{
+		EFilenameRegex,
+		ETitleRegex
+	};
 
-		struct RegexEntry
-		{
-			QRegExp		regex;
-			RegexType	type;
-		};
+	struct RegexEntry
+	{
+		QRegExp		regex;
+		RegexType	type;
+	};
 
-		QList<RegexEntry> regexes;
-		QList<Primitive> prims;
+	QList<RegexEntry> regexes;
+	QList<Primitive> prims;
 
-		explicit PrimitiveCategory (QString name, QObject* parent = 0);
-		bool isValidToInclude();
+	explicit PrimitiveCategory (QString name, QObject* parent = 0);
+	bool isValidToInclude();
 
-		static void loadCategories();
-		static void populateCategories();
+	static void loadCategories();
+	static void populateCategories();
 };
 
-// =============================================================================
-//
-// PrimitiveScanner
 //
 // Worker object that scans the primitives folder for primitives and
 // builds an index of them.
@@ -71,24 +69,24 @@
 {
 	Q_OBJECT
 
-	public:
-		explicit			PrimitiveScanner (QObject* parent = 0);
-		virtual				~PrimitiveScanner();
-		static void			start();
+public:
+	explicit			PrimitiveScanner (QObject* parent = 0);
+	virtual				~PrimitiveScanner();
+	static void			start();
 
-	public slots:
-		void				work();
+public slots:
+	void				work();
 
-	signals:
-		void				starting (int num);
-		void				workDone();
-		void				update (int i);
+signals:
+	void				starting (int num);
+	void				workDone();
+	void				update (int i);
 
-	private:
-		QList<Primitive>	m_prims;
-		QStringList			m_files;
-		int					m_i;
-		int					m_baselen;
+private:
+	QList<Primitive>	m_prims;
+	QStringList			m_files;
+	int					m_i;
+	int					m_baselen;
 };
 
 extern QList<PrimitiveCategory*> g_PrimitiveCategories;
@@ -106,18 +104,17 @@
 	Cone,
 };
 
-// =============================================================================
 class PrimitivePrompt : public QDialog
 {
 	Q_OBJECT
 
-	public:
-		explicit PrimitivePrompt (QWidget* parent = null, Qt::WindowFlags f = 0);
-		virtual ~PrimitivePrompt();
-		Ui_MakePrimUI* ui;
+public:
+	explicit PrimitivePrompt (QWidget* parent = null, Qt::WindowFlags f = 0);
+	virtual ~PrimitivePrompt();
+	Ui_MakePrimUI* ui;
 
-	public slots:
-		void hiResToggled (bool on);
+public slots:
+	void hiResToggled (bool on);
 };
 
 void makeCircle (int segs, int divs, double radius, QList<QLineF>& lines);

mercurial