source: geovis/trunk/Icons.cpp @ 6666

Last change on this file since 6666 was 6048, checked in by ldelgass, 9 years ago

add icons

  • Property svn:eol-style set to native
File size: 881 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2016 HUBzero Foundation, LLC
4 *
5 * Author: Leif Delgass <ldelgass@purdue.edu>
6 */
7
8#include "Icons.h"
9
10using namespace GeoVis;
11
12std::tr1::unordered_map<std::string, std::string> GeoVis::g_icons;
13
14void GeoVis::initIconMap()
15{
16    g_icons["pin"] = ICON_PIN;
17    g_icons["pin1"] = ICON_PIN1;
18    g_icons["pin2"] = ICON_PIN2;
19    g_icons["pin3"] = ICON_PIN3;
20    g_icons["pin4"] = ICON_PIN4;
21    g_icons["pin5"] = ICON_PIN5;
22    g_icons["pin6"] = ICON_PIN6;
23    g_icons["pin7"] = ICON_PIN7;
24    g_icons["pin8"] = ICON_PIN8;
25    g_icons["pin9"] = ICON_PIN9;
26    g_icons["pin10"] = ICON_PIN10;
27}
28
29std::string GeoVis::getIconFile(const char *name)
30{
31    IconHashmap::iterator itr = g_icons.find(name);
32    if (itr == g_icons.end()) {
33        return "";
34    } else {
35        return itr->second;
36    }
37}
Note: See TracBrowser for help on using the repository browser.