1/*
2 Copyright (c) 2012 Montel Laurent <montel@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18
19*/
20
21#ifndef KPIMTEXTEDIT_TABLECELLFORMATDIALOG_H
22#define KPIMTEXTEDIT_TABLECELLFORMATDIALOG_H
23
24#include "kpimtextedit_export.h"
25
26#include <KDE/KDialog>
27
28#include <QTextCharFormat>
29
30namespace KPIMTextEdit {
31
32class KPIMTEXTEDIT_EXPORT TableCellFormatDialog : public KDialog
33{
34 public:
35 explicit TableCellFormatDialog( QWidget *parent );
36 ~TableCellFormatDialog();
37
38 /**
39 * @brief tableCellBackgroundColor
40 * @return background color of cell.
41 */
42 QColor tableCellBackgroundColor() const;
43
44 /**
45 * @brief setTableCellBackgroundColor
46 * @param color, set the background color of cell
47 */
48 void setTableCellBackgroundColor( const QColor &color );
49
50 /**
51 * @brief verticalAlignment
52 * @return vertical alignment for current cell.
53 */
54 QTextCharFormat::VerticalAlignment verticalAlignment() const;
55
56 /**
57 * @brief setVerticalAlignment
58 * @param vertical vertical alignment for current cell.
59 */
60 void setVerticalAlignment( QTextCharFormat::VerticalAlignment vertical );
61
62 /**
63 * @brief useBackgroundColor
64 * @return true if we define background color. Otherwise false and allows to clear it.
65 */
66 bool useBackgroundColor() const;
67
68 private:
69 class TableCellFormatDialogPrivate;
70 TableCellFormatDialogPrivate * const d;
71};
72
73}
74
75#endif // KPIMTEXTEDIT_TABLECELLFORMATDIALOG_H
76