Documentation
[yamf.git] / yamf / drawing / private / addsymboldialog.h
blobdeadbaff7c7e9b6abb51d82587739224431c0fc7
1 /***************************************************************************
2 * Copyright (C) 2007 David Cuadrado *
3 * krawek@gmail.com *
4 * *
5 * This library is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU Lesser General Public *
7 * License as published by the Free Software Foundation; either *
8 * version 2.1 of the License, or (at your option) any later version. *
9 * *
10 * This library 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 GNU *
13 * Lesser General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU Lesser General Public *
16 * License along with this library; if not, write to the Free Software *
17 * Foundation, Inc., *
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
23 #ifndef YAMF_DRAWING_PRIVATEADDSYMBOLDIALOG_H
24 #define YAMF_DRAWING_PRIVATEADDSYMBOLDIALOG_H
26 #include <QDialog>
27 #include <QHash>
29 namespace Ui {
30 class AddSymbolDialog;
33 class QGraphicsItem;
35 namespace YAMF {
36 namespace Drawing {
37 namespace Private {
39 /**
40 * @ingroup drawing
41 * @author David Cuadrado <krawek@gmail.com>
43 class AddSymbolDialog : public QDialog
45 Q_OBJECT;
47 public:
48 AddSymbolDialog(QWidget *parent = 0);
49 ~AddSymbolDialog();
51 void addSymbol(QGraphicsItem *symbol);
53 QGraphicsItem *symbol(int pos) const;
54 QString symbolName(int pos) const;
55 int symbolCount() const;
57 private slots:
58 void onSymbolChanged(int index);
59 void setSymbolName(const QString &name);
60 void checkNames();
62 private:
63 Ui::AddSymbolDialog *builder;
65 QHash<int, QGraphicsItem *> m_symbols;
66 QHash<int, QString> m_names;
75 #endif