digiKam
tooltipcreator.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2009-09-14
7  * Description : a class to build the tooltip for a renameparser and its options
8  *
9  * Copyright (C) 2009-2012 by Andi Clemens <andi dot clemens at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_TOOL_TIPCREATOR_H
25 #define DIGIKAM_TOOL_TIPCREATOR_H
26 
27 // Qt includes
28 
29 #include <QString>
30 
31 // Local includes
32 
33 #include "rule.h"
34 
35 namespace Digikam
36 {
37 
38 class Parser;
39 
41 {
42 public:
43 
45  {
46  };
47 
48  static TooltipCreator& getInstance();
49 
50  QString tooltip(Parser* parser);
51 
52  QString getInfoIconResourceName();
53  QIcon getInfoIcon();
54 
55 private:
56 
58 
59  QString markOption(const QString& str);
60  QString tableStart();
61  QString tableStart(int widthPercentage);
62  QString tableEnd();
63 
64  QString additionalInformation();
65 
67 
68  QString createEntries(const RulesList& data);
69  QString createSection(const QString& sectionName, const RulesList& data, bool lastSection = false);
70  QString createHeader(const QString& str);
71 
72 private:
73 
74  // Disable
75  explicit TooltipCreator() = default;
76  TooltipCreator(const TooltipCreator&) = delete;
77  TooltipCreator& operator=(const TooltipCreator&) = delete;
78 
79 };
80 
81 } // namespace Digikam
82 
83 #endif // DIGIKAM_TOOL_TIPCREATOR_H
Definition: parser.h:45
Definition: tooltipcreator.h:41
~TooltipCreator()
Definition: tooltipcreator.h:44
QIcon getInfoIcon()
Definition: tooltipcreator.cpp:90
QString getInfoIconResourceName()
Definition: tooltipcreator.cpp:85
static TooltipCreator & getInstance()
Definition: tooltipcreator.cpp:46
QString tooltip(Parser *parser)
Definition: tooltipcreator.cpp:95
Definition: datefolderview.cpp:43