[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs
From:       Christoph Cullmann <cullmann () absint ! com>
Date:       2007-10-04 9:51:39
Message-ID: 200710041151.39768.cullmann () absint ! com
[Download RAW message or body]

On Thursday 04 October 2007 11:09, Anders Lund wrote:
> SVN commit 720996 by alund:
>
> Add functions to return the section of a highlight-mode or mode, given its
> index in the list returned by highlightModes() or modes(). Approved by
> Christoph Cullmann.
higlightingModeSection, no highlightModeSection, see setHighlightingMode(

> FEATURE:
>
>
>  M  +16 -0     interfaces/ktexteditor/document.h
>  M  +10 -0     kate/document/katedocument.cpp
>  M  +15 -0     kate/document/katedocument.h
>
>
> --- trunk/KDE/kdelibs/interfaces/ktexteditor/document.h #720995:720996
> @@ -629,6 +629,22 @@
>       */
>      virtual bool setHighlightingMode(const QString &name) = 0;
>
> +    /**
> +     * Returns the name of the section for a highlight given its index in
> the highlight +     * list (as returned by highlightModes()).
> +     * You can use this function to build a tree of the highlight names,
> organized in sections. +     * \param name the name of the highlight for
> which to find the section name. +     */
> +    virtual QString highlightModeSection( int index ) const = 0;
> +
> +    /**
> +     * Returns the name of the section for a mode given its index in the
> highlight +     * list (as returned by modes()).
> +     * You can use this function to build a tree of the mode names,
> organized in sections. +     * \param name the name of the highlight for
> which to find the section name. +     */
> +    virtual QString modeSection( int index ) const = 0;
> +
>    /*
>     * SIGNALS
>     * Following signals should be emitted by the document if the mode
> --- trunk/KDE/kdelibs/kate/document/katedocument.cpp #720995:720996
> @@ -3014,6 +3014,16 @@
>    return hls;
>  }
>
> +QString KateDocument::highlightModeSection( int index ) const
> +{
> +  return KateHlManager::self()->hlSection( index );
> +}
> +
> +QString KateDocument::modeSection( int index ) const
> +{
> +  return KateGlobal::self()->modeManager()->list()[ index ]->section;
> +}
> +
>  void KateDocument::bufferHlChanged ()
>  {
>    // update all views
> --- trunk/KDE/kdelibs/kate/document/katedocument.h #720995:720996
> @@ -506,7 +506,22 @@
>       * \return \e true on success, otherwise \e false
>       */
>      virtual bool setHighlightingMode(const QString &name);
> +    /**
> +     * Returns the name of the section for a highlight given its index in
> the highlight +     * list (as returned by highlightModes()).
> +     * You can use this function to build a tree of the highlight names,
> organized in sections. +     * \param name the name of the highlight for
> which to find the section name. +     */
> +    virtual QString highlightModeSection( int index ) const;
>
> +    /**
> +     * Returns the name of the section for a mode given its index in the
> highlight +     * list (as returned by modes()).
> +     * You can use this function to build a tree of the mode names,
> organized in sections. +     * \param name the name of the highlight for
> which to find the section name. +     */
> +    virtual QString modeSection( int index ) const;
> +
>    /*
>     * SIGNALS
>     * Following signals should be emitted by the document if the mode

-- 
-------------------------------------- Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH      Email: cullmann@AbsInt.com
Science Park 1                         Tel:   +49-681-38360-22
66123 Saarbrücken                      Fax:   +49-681-38360-20
GERMANY                                WWW:   http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic