/* This file is part of the KDE libraries
    Copyright (C) 2008 Alexander Dymo <adymo@kdevelop.org>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.
*/
#ifndef KSHORTCUTSCHEMESHELPER_P_H
#define KSHORTCUTSCHEMESHELPER_P_H

#include <QString>

class KActionCollection;
class KXMLGUIClient;

class KShortcutSchemesHelper
{
public:

    /**
     * Saves actions from these collections to the shortcut scheme file.
     *
     * This doesn't save anything for action collections without a parent xmlgui client.
     *
     *  @return true if the shortcut scheme was successfully saved.
    */
    static bool saveShortcutScheme(const QList<KActionCollection *> &collections, const QString &schemeName);

    /**
     * @return the current shortcut scheme name for the application.
    */
    static QString currentShortcutSchemeName();

    /**
     * @return the name of the (writable) file to save the shortcut scheme to.
    */
    static QString writableShortcutSchemeFileName(const QString &componentName, const QString &schemeName);

    /**
     * @return the name of the scheme file for application itself.
    */
    static QString writableApplicationShortcutSchemeFileName(const QString &schemeName);

    /**
     * @return the name of the file to read the shortcut scheme from.
    */
    static QString shortcutSchemeFileName(const QString &componentName, const QString &schemeName);

    /**
     * @return the name of the scheme file for application itself, for reading.
    */
    static QString applicationShortcutSchemeFileName(const QString &schemeName);
};

#endif
