File indexing completed on 2024-05-19 15:27:46

0001 /***************************************************************************
0002  *   Copyright (C) 2005-2007 by Gael de Chalendar   *
0003  *   kleag@free.fr   *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  *                                                                         *
0010  *   This program is distributed in the hope that it will be useful,       *
0011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0013  *   GNU General Public License for more details.                          *
0014  *                                                                         *
0015    You should have received a copy of the GNU General Public License
0016    along with this program; if not, write to the Free Software
0017    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0018    02110-1301, USA
0019  ***************************************************************************/
0020 #ifndef DOT2QTCONSTS_H
0021 #define DOT2QTCONSTS_H
0022 
0023 #include <QFont>
0024 #include <QMap>
0025 #include <QString>
0026 
0027 /**
0028 @author Gael de Chalendar
0029 */
0030 class Dot2QtConsts
0031 {
0032 public:
0033     static const Dot2QtConsts &componentData()
0034     {
0035         return m_componentData;
0036     }
0037 
0038     QColor qtColor(const QString &dotColor) const;
0039     Qt::PenStyle qtPenStyle(const QString &dotLineStyle) const;
0040     QFont qtFont(const QString &dotFont) const;
0041 
0042 private:
0043     Dot2QtConsts();
0044 
0045     ~Dot2QtConsts();
0046 
0047     static const Dot2QtConsts m_componentData;
0048 
0049     QMap<QString, Qt::PenStyle> m_penStyles;
0050     QMap<QString, QString> m_colors;
0051     QMap<QString, QColor> m_qcolors;
0052     QMap<QString, QFont> m_psFonts;
0053 };
0054 
0055 #endif