An editable list of color swatches, taken from an associated QgsColorScheme.  
 More...
#include <qgscolorschemelist.h>
An editable list of color swatches, taken from an associated QgsColorScheme. 
- See also
 - QgsColorSchemeList 
 
- Since
 - QGIS 2.5 
 
Definition at line 163 of file qgscolorschemelist.h.
 
◆ QgsColorSchemeList()
      
        
          | QgsColorSchemeList::QgsColorSchemeList  | 
          ( | 
          QWidget *  | 
          parent = nullptr,  | 
        
        
           | 
           | 
          QgsColorScheme *  | 
          scheme = nullptr,  | 
        
        
           | 
           | 
          const QString &  | 
          context = QString(),  | 
        
        
           | 
           | 
          const QColor &  | 
          baseColor = QColor()  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Construct a new color swatch grid. 
- Parameters
 - 
  
    | parent | parent widget  | 
    | scheme | QgsColorScheme for colors to show in the list  | 
    | context | context string provided to color scheme  | 
    | baseColor | base color for color scheme  | 
  
   
Definition at line 35 of file qgscolorschemelist.cpp.
 
 
◆ addColor
  
  
      
        
          | void QgsColorSchemeList::addColor  | 
          ( | 
          const QColor &  | 
          color,  | 
         
        
           | 
           | 
          const QString &  | 
          label = QString(),  | 
         
        
           | 
           | 
          bool  | 
          allowDuplicate = false  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
slot   | 
  
 
Adds a color to the list. 
- Parameters
 - 
  
    | color | color to add  | 
    | label | optional label for color  | 
    | allowDuplicate | set to true to allow duplicate colors to be added, ie colors which already exist in the list  | 
  
   
Definition at line 95 of file qgscolorschemelist.cpp.
 
 
◆ colorSelected
  
  
      
        
          | void QgsColorSchemeList::colorSelected  | 
          ( | 
          const QColor &  | 
          color | ) | 
           | 
         
       
   | 
  
signal   | 
  
 
Emitted when a color is selected from the list. 
- Parameters
 - 
  
  
 
 
 
◆ copyColors
  
  
      
        
          | void QgsColorSchemeList::copyColors  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
 
◆ exportColorsToGpl()
      
        
          | bool QgsColorSchemeList::exportColorsToGpl  | 
          ( | 
          QFile &  | 
          file | ) | 
           | 
        
      
 
 
◆ importColorsFromGpl()
      
        
          | bool QgsColorSchemeList::importColorsFromGpl  | 
          ( | 
          QFile &  | 
          file | ) | 
           | 
        
      
 
 
◆ isDirty()
      
        
          | bool QgsColorSchemeList::isDirty  | 
          ( | 
           | ) | 
           const | 
        
      
 
Returns whether the color scheme list has been modified. 
- Returns
 true if colors have been modified 
Definition at line 287 of file qgscolorschemelist.cpp.
 
 
◆ keyPressEvent()
  
  
      
        
          | void QgsColorSchemeList::keyPressEvent  | 
          ( | 
          QKeyEvent *  | 
          event | ) | 
           | 
         
       
   | 
  
overrideprotected   | 
  
 
 
◆ mousePressEvent()
  
  
      
        
          | void QgsColorSchemeList::mousePressEvent  | 
          ( | 
          QMouseEvent *  | 
          event | ) | 
           | 
         
       
   | 
  
overrideprotected   | 
  
 
 
◆ mouseReleaseEvent()
  
  
      
        
          | void QgsColorSchemeList::mouseReleaseEvent  | 
          ( | 
          QMouseEvent *  | 
          event | ) | 
           | 
         
       
   | 
  
overrideprotected   | 
  
 
 
◆ pasteColors
  
  
      
        
          | void QgsColorSchemeList::pasteColors  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
 
◆ removeSelection
  
  
      
        
          | void QgsColorSchemeList::removeSelection  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
 
◆ saveColorsToScheme()
      
        
          | bool QgsColorSchemeList::saveColorsToScheme  | 
          ( | 
           | ) | 
           | 
        
      
 
Saves the current colors shown in the list back to a color scheme, if supported by the color scheme. 
- Note
 - this method is only effective if the color scheme is editable 
 
Definition at line 64 of file qgscolorschemelist.cpp.
 
 
◆ scheme()
◆ setScheme
  
  
      
        
          | void QgsColorSchemeList::setScheme  | 
          ( | 
          QgsColorScheme *  | 
          scheme,  | 
         
        
           | 
           | 
          const QString &  | 
          context = QString(),  | 
         
        
           | 
           | 
          const QColor &  | 
          baseColor = QColor()  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
slot   | 
  
 
Sets the color scheme to show in the list. 
- Parameters
 - 
  
    | scheme | QgsColorScheme for colors to show in the list  | 
    | context | context string provided to color scheme  | 
    | baseColor | base color for color scheme  | 
  
   
- See also
 - scheme() 
 
Definition at line 58 of file qgscolorschemelist.cpp.
 
 
◆ showExportColorsDialog
  
  
      
        
          | void QgsColorSchemeList::showExportColorsDialog  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
 
◆ showImportColorsDialog
  
  
      
        
          | void QgsColorSchemeList::showImportColorsDialog  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
 
The documentation for this class was generated from the following files: