Source-highlight Qt Library
srchiliteqt::LanguageComboBox Class Reference

A subclass of QComboBox which provides functionalities for showing and selecting the language definition files of Source-Highlight. More...

#include <LanguageComboBox.h>

Inheritance diagram for srchiliteqt::LanguageComboBox:
Collaboration diagram for srchiliteqt::LanguageComboBox:

Public Slots

void setCurrentLanguage (const QString &lang)
 Sets the language in the combo. More...
 
const QString getCurrentLanguage () const
 
void reload (const QString &path)
 Reloads the contents of the combo box by using the specified path for searching for .lang files. More...
 

Public Member Functions

 LanguageComboBox (const QString &path="")
 Initializes the combo box with the .lang files retrieved in the specified path. More...
 
 LanguageComboBox (Qt4SyntaxHighlighter *_highlighter)
 

Detailed Description

A subclass of QComboBox which provides functionalities for showing and selecting the language definition files of Source-Highlight.

Constructor & Destructor Documentation

srchiliteqt::LanguageComboBox::LanguageComboBox ( const QString &  path = "")

Initializes the combo box with the .lang files retrieved in the specified path.

Parameters
pathwhere to look for .lang files (if empty, uses the data dir path of source-highlight)
srchiliteqt::LanguageComboBox::LanguageComboBox ( srchiliteqt::Qt4SyntaxHighlighter highlighter)
Parameters
_highlighterthe highlighter object; this will be used only for initialization
Deprecated:
use the other constructor, which permits not needing a Qt4SyntaxHighlighter only for initialization

Member Function Documentation

const QString srchiliteqt::LanguageComboBox::getCurrentLanguage ( ) const
slot
Returns
the language definition file name currently selected
void srchiliteqt::LanguageComboBox::reload ( const QString &  path)
slot

Reloads the contents of the combo box by using the specified path for searching for .lang files.

Parameters
path
void srchiliteqt::LanguageComboBox::setCurrentLanguage ( const QString &  lang)
slot

Sets the language in the combo.

Parameters
langthe language name; if the language is not part of the combo list, nothing happens

The documentation for this class was generated from the following files: