1 /*****************************************************************************
2 * cssedit.h - QStarDict, a StarDict clone written with using Qt *
3 * Copyright (C) 2008 Alexander Rodin *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License along *
16 * with this program; if not, write to the Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
18 *****************************************************************************/
23 #include "ui_cssedit.h"
32 class CSSEdit: public QWidget, private Ui::CSSEdit
40 CSSEdit(QWidget *parent = 0);
43 * Set CSS style for editing.
45 void setCSS(const QString &css);
47 * Returns edited CSS style.
51 * Set aliases for elements.
53 void setElementsAliases(const QHash<QString, QString> &aliases);
55 * Returns elements aliases.
57 const QHash<QString, QString> &elementsAliases() const
58 { return m_elementsAliases; }
61 void colorSelectClicked();
62 void setCurrentElement(int index);
63 void propertyChanged();
66 typedef QHash<QString, QString> Element;
68 void updateElementCombo();
70 Element getParentElement(const QString &elementName);
72 QHash<QString, Element> m_elements;
73 QHash<QString, QString> m_elementsAliases;
74 QString m_currentElement;
80 // vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab cindent