Пример #1
0
void QgsColorSchemeRegistry::addDefaultSchemes()
{
  //default color schemes
  addColorScheme( new QgsRecentColorScheme() );
  addColorScheme( new QgsCustomColorScheme() );
  addColorScheme( new QgsProjectColorScheme() );

}
Пример #2
0
void QgsColorSchemeRegistry::populateFromInstance()
{
  //get schemes from global instance
  QList< QgsColorScheme* > schemeList = QgsColorSchemeRegistry::instance()->schemes();

  //add to this scheme registry
  QList< QgsColorScheme* >::iterator it = schemeList.begin();
  for ( ; it != schemeList.end(); ++it )
  {
    addColorScheme(( *it )->clone() );
  }
}
Пример #3
0
void QgsColorSchemeRegistry::addUserSchemes()
{
  QString palettesDir = QgsApplication::qgisSettingsDirPath() + "/palettes";

  QDir localDir;
  if ( !localDir.mkpath( palettesDir ) )
  {
    return;
  }

  QFileInfoList fileInfoList = QDir( palettesDir ).entryInfoList( QStringList( "*.gpl" ), QDir::Files );
  QFileInfoList::const_iterator infoIt = fileInfoList.constBegin();
  for ( ; infoIt != fileInfoList.constEnd(); ++infoIt )
  {
    addColorScheme( new QgsUserColorScheme( infoIt->fileName() ) );
  }
}
Пример #4
0
void setupColor()
{
    //please when you add a color  comment the color scheme enum beside it and 
    //add the enum to color.h
    //call add ColorScheme here
    
    addColorScheme(t_color(0xDF, 0xDF, 0xDF), t_color(0x00, 0x00, 0x00)); //grey to black
    addColorScheme(t_color(0x8C, 0x8C, 0x8C), t_color(0x9C, 0x73, 0x10)); // Street Borders (BORDERC)
    addColorScheme(t_color(0xFF, 0xFF, 0xFF), t_color(0x9C, 0x73, 0x10)); // Street (STREETC)
    addColorScheme(t_color(0xFF, 0xE1, 0x68), t_color(0x9C, 0x73, 0x10)); // highways (HIGHWAYC) (orange)
    addColorScheme(t_color(0xAC, 0xC7, 0xF2), t_color(0x00, 0xFF, 0xFF)); // water (BLUEC)
    addColorScheme(t_color(0xFA, 0xF2, 0xC7), t_color(0xF3, 0xF3, 0x15)); // sand (TANC)
    addColorScheme(t_color(0xCA, 0xDF, 0xAA), t_color(0x00, 0xFF, 0x00)); // grass (GREENC) (green)
    addColorScheme(t_color(0x87, 0xCE, 0xFA), t_color(0xFF, 0x00, 0xFF)); // POIs (POIC)
    addColorScheme(t_color(0xFF, 0x00, 0xFF), t_color(0xFF, 0x00, 0xFF)); // testing magenta
    addColorScheme(t_color(0x00, 0x00, 0x00), t_color(0xFF, 0xFF, 0xFF)); // Black to white (TEXT)
    addColorScheme(t_color(0xFF, 0x00, 0x00), t_color(0xFF, 0x00, 0x00)); // Highlighted path (red)
    addColorScheme(t_color(0xC0, 0xE2, 0xFF), t_color(0x00, 0xFF, 0xFF)); // light blue
    addColorScheme(t_color(0xAA, 0xC5, 0xF0), t_color(0x00, 0xFF, 0xFF)); // dark blue
    addColorScheme(t_color(0xF2, 0xCA, 0xEA), t_color(0xF3, 0xF3, 0x15)); // pink (tourist attractions)
    addColorScheme(t_color(0x71, 0x8C, 0xC3), t_color(0x00, 0xFF, 0xFF)); // theme (for addons and stuff)
    addColorScheme(t_color(0xCF, 0xE1, 0xB7), t_color(0x00, 0xFF, 0x00)); // light green
    addColorScheme(t_color(0xC8, 0xDC, 0xC8), t_color(0x00, 0xFF, 0x00)); // dark green (kind of turquoise right now)
    addColorScheme(t_color(0xDE, 0xB8, 0x87), t_color(0xF3, 0xF3, 0x15)); // brown
    addColorScheme(t_color(0xBD, 0xB7, 0x6B), t_color(0xF3, 0xF3, 0x15)); // green brown
    addColorScheme(t_color(0xA9, 0xA9, 0xA9), t_color(0x9C, 0x73, 0x10)); // grey
    addColorScheme(t_color(0xC0, 0xC7, 0xCF), t_color(0x00, 0xFF, 0xFF)); // one way symbols
}