libyui-mga  1.0.7
YMGAAboutDialog.h
1 /*
2  Copyright 2014-2016 by Matteo Pasotti
3  2016 Angelo Naselli
4 
5  This library is free software; you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as
7  published by the Free Software Foundation; either version 2.1 of the
8  License, or (at your option) version 3.0 of the License. This library
9  is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12  License for more details. You should have received a copy of the GNU
13  Lesser General Public License along with this library; if not, write
14  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
15  Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef YMGAAboutDialog_h
19 #define YMGAAboutDialog_h
20 
21 #include <string>
22 
24 class YDialog;
25 class YReplacePoint;
26 
28 {
29 public:
30  enum DLG_MODE {
31  CLASSIC,
32  TABBED
33  };
34 
35  YMGAAboutDialog(const std::string& name,
36  const std::string& version,
37  const std::string& license,
38  const std::string& authors,
39  const std::string& description,
40  const std::string& logo,
41  const std::string& icon = std::string(),
42  const std::string& credits = std::string(),
43  const std::string& information = std::string()
44  );
45  virtual ~YMGAAboutDialog();
46 
47  void setMinSize(YLayoutSize_t columns, YLayoutSize_t lines);
48 
49  void show(DLG_MODE type = TABBED);
50 
51 private:
53 
54  void genAuthorsTab(YReplacePoint* rpoint);
55  void genContributorsTab(YReplacePoint* rpoint);
56  void genInformationTab(YReplacePoint* rpoint);
57 
58  void Tabbed();
59  void Classic();
60 
61  void showInformation();
62  void showCredits();
63 };
64 
65 
66 #endif //YMGAAboutDialog_h
void setMinSize(YLayoutSize_t columns, YLayoutSize_t lines)
Set the dialog mimimum size if Classic dialog is shown, minimum text size otherwise.
YMGAAboutDialog(const std::string &name, const std::string &version, const std::string &license, const std::string &authors, const std::string &description, const std::string &logo, const std::string &icon=std::string(), const std::string &credits=std::string(), const std::string &information=std::string())
The constructor.
void show(DLG_MODE type=TABBED)
it actually shows the about dialog