removed unneeded stuff

Tue, 13 Feb 2018 15:43:55 +0200

author
Santeri Piippo
date
Tue, 13 Feb 2018 15:43:55 +0200
changeset 1243
0fb1d3d17b60
parent 1242
725cb1084044
child 1244
68e126e8c629

removed unneeded stuff

CMakeLists.txt file | annotate | diff | comparison | revisions
src/doublemap.h file | annotate | diff | comparison | revisions
src/mainwindow.h file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Tue Feb 13 14:56:08 2018 +0200
+++ b/CMakeLists.txt	Tue Feb 13 15:43:55 2018 +0200
@@ -95,7 +95,6 @@
 	src/documentation.h
 	src/documentloader.h
 	src/documentmanager.h
-	src/doublemap.h
 	src/editHistory.h
 	src/format.h
 	src/glcamera.h
--- a/src/doublemap.h	Tue Feb 13 14:56:08 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
- *  LDForge: LDraw parts authoring CAD
- *  Copyright (C) 2013 - 2017 Teemu Piippo
- *
- *  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 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-#include <QMap>
-
-template<typename Key, typename Value>
-class DoubleMap
-{
-public:
-	void clear()
-	{
-		m_map.clear();
-		m_reverseMap.clear();
-	}
-
-	void insert (const Key& key, const Value& value)
-	{
-		m_map[key] = value;
-		m_reverseMap[value] = key;
-	}
-
-	bool containsKey (const Key& key) const
-	{
-		return m_map.contains (key);
-	}
-
-	bool containsValue (const Value& value) const
-	{
-		return m_reverseMap.contains (value);
-	}
-
-	void removeKey (const Key& key)
-	{
-		m_reverseMap.remove (m_map[key]);
-		m_map.remove (key);
-	}
-
-	void removeValue (const Key& key)
-	{
-		m_reverseMap.remove (m_map[key]);
-		m_map.remove (key);
-	}
-
-	Value& lookup (const Key& key)
-	{
-		return m_map[key];
-	}
-
-	const Value& lookup (const Key& key) const
-	{
-		return m_map[key];
-	}
-
-	Key& reverseLookup (const Value& key)
-	{
-		return m_reverseMap[key];
-	}
-
-	const Key& reverseLookup (const Value& key) const
-	{
-		return m_reverseMap[key];
-	}
-
-	Value* find (const Key& key)
-	{
-		auto iterator = m_map.find (key);
-		return iterator == m_map.end() ? NULL : &(*iterator);
-	}
-
-	Key* reverseFind (const Value& value)
-	{
-		auto iterator = m_reverseMap.find (value);
-		return iterator == m_reverseMap.end() ? NULL : &(*iterator);
-	}
-
-	Value& operator[] (const Key& key)
-	{
-		return lookup (key);
-	}
-
-	const Value& operator[] (const Key& key) const
-	{
-		return lookup (key);
-	}
-
-private:
-	QMap<Key, Value> m_map;
-	QMap<Value, Key> m_reverseMap;
-};
--- a/src/mainwindow.h	Tue Feb 13 14:56:08 2018 +0200
+++ b/src/mainwindow.h	Tue Feb 13 15:43:55 2018 +0200
@@ -26,7 +26,6 @@
 #include <QMetaMethod>
 #include "linetypes/modelobject.h"
 #include "colors.h"
-#include "doublemap.h"
 
 class MessageManager;
 class QToolButton;
@@ -162,7 +161,6 @@
 	class QSettings* m_settings;
 	DocumentManager* m_documents;
 	LDDocument* m_currentDocument;
-	DoubleMap<LDObject*, QListWidgetItem*> m_objectsInList;
 	QMap<QAction*, QKeySequence> m_defaultShortcuts;
 
 private slots:

mercurial