Dooble
dooble_about.h
1 /*
2 ** Copyright (c) 2008 - present, Alexis Megas.
3 ** All rights reserved.
4 **
5 ** Redistribution and use in source and binary forms, with or without
6 ** modification, are permitted provided that the following conditions
7 ** are met:
8 ** 1. Redistributions of source code must retain the above copyright
9 ** notice, this list of conditions and the following disclaimer.
10 ** 2. Redistributions in binary form must reproduce the above copyright
11 ** notice, this list of conditions and the following disclaimer in the
12 ** documentation and/or other materials provided with the distribution.
13 ** 3. The name of the author may not be used to endorse or promote products
14 ** derived from Dooble without specific prior written permission.
15 **
16 ** DOOBLE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 ** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 ** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 ** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 ** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 ** DOOBLE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef dooble_about_h
29 #define dooble_about_h
30 
31 #include <QFuture>
32 
33 #include "ui_dooble_about.h"
34 
35 #ifndef dooble_architecture_h
36 #define dooble_architecture_h
37 #if defined(__alpha_ev4__)
38 #define DOOBLE_ARCHITECTURE_STR "__alpha_ev4__"
39 #elif defined(__alpha_ev5__)
40 #define DOOBLE_ARCHITECTURE_STR "__alpha_ev5__"
41 #elif defined(__alpha_ev6__)
42 #define DOOBLE_ARCHITECTURE_STR "__alpha_ev6__"
43 #elif defined(__alpha__)
44 #define DOOBLE_ARCHITECTURE_STR "__alpha__"
45 #elif defined(__amd64__)
46 #define DOOBLE_ARCHITECTURE_STR "__amd64__"
47 #elif defined(__amd64)
48 #define DOOBLE_ARCHITECTURE_STR "__amd64"
49 #elif defined(__x86_64__)
50 #define DOOBLE_ARCHITECTURE_STR "__x86_64__"
51 #elif defined(__x86_64)
52 #define DOOBLE_ARCHITECTURE_STR "__x86_64"
53 #elif defined(__ARM_ARCH_6J__)
54 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_6J__"
55 #elif defined(__ARM_ARCH_6K__)
56 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_6K__"
57 #elif defined(__ARM_ARCH_6T2__)
58 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_6T2__"
59 #elif defined(__ARM_ARCH_6ZK__)
60 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_6ZK__"
61 #elif defined(__ARM_ARCH_6Z__)
62 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_6Z__"
63 #elif defined(__ARM_ARCH_6__)
64 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_6__"
65 #elif defined(__ARM_ARCH_7A__)
66 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_7A__"
67 #elif defined(__ARM_ARCH_7M__)
68 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_7M__"
69 #elif defined(__ARM_ARCH_7R__)
70 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_7R__"
71 #elif defined(__ARM_ARCH_7S__)
72 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_7S__"
73 #elif defined(__ARM_ARCH_7__)
74 #define DOOBLE_ARCHITECTURE_STR "__ARM_ARCH_7__"
75 #elif defined(i386)
76 #define DOOBLE_ARCHITECTURE_STR "i386"
77 #elif defined(__i386)
78 #define DOOBLE_ARCHITECTURE_STR "__i386"
79 #elif defined(__i386__)
80 #define DOOBLE_ARCHITECTURE_STR "__i386__"
81 #elif defined(__i486__)
82 #define DOOBLE_ARCHITECTURE_STR "__i486__"
83 #elif defined(__i586__)
84 #define DOOBLE_ARCHITECTURE_STR "__i586__"
85 #elif defined(__i686__)
86 #define DOOBLE_ARCHITECTURE_STR "__i686__"
87 #elif defined(_X86_)
88 #define DOOBLE_ARCHITECTURE_STR "_X86_"
89 #elif defined(__ia64__)
90 #define DOOBLE_ARCHITECTURE_STR "__ia64__"
91 #elif defined(_IA64)
92 #define DOOBLE_ARCHITECTURE_STR "_IA64"
93 #elif defined(__IA64__)
94 #define DOOBLE_ARCHITECTURE_STR "__IA64__"
95 #elif defined(__powerpc64__)
96 #define DOOBLE_ARCHITECTURE_STR "__powerpc64__"
97 #elif defined(__ppc64__)
98 #define DOOBLE_ARCHITECTURE_STR "__ppc64__"
99 #elif defined(__PPC64__)
100 #define DOOBLE_ARCHITECTURE_STR "__PPC64__"
101 #elif defined(_ARCH_PPC64)
102 #define DOOBLE_ARCHITECTURE_STR "_ARCH_PPC64"
103 #elif defined(__powerpc)
104 #define DOOBLE_ARCHITECTURE_STR "__powerpc"
105 #elif defined(__powerpc__)
106 #define DOOBLE_ARCHITECTURE_STR "__powerpc__"
107 #elif defined(__POWERPC__)
108 #define DOOBLE_ARCHITECTURE_STR "__POWERPC__"
109 #elif defined(__ppc__)
110 #define DOOBLE_ARCHITECTURE_STR "__ppc__"
111 #elif defined(__PPC__)
112 #define DOOBLE_ARCHITECTURE_STR "__PPC__"
113 #elif defined(_ARCH_PPC)
114 #define DOOBLE_ARCHITECTURE_STR "_ARCH_PPC"
115 #elif defined(__sparc_v8__)
116 #define DOOBLE_ARCHITECTURE_STR "__sparc_v8__"
117 #elif defined(__sparc_v9__)
118 #define DOOBLE_ARCHITECTURE_STR "__sparc_v9__"
119 #elif defined(__sparcv8)
120 #define DOOBLE_ARCHITECTURE_STR "__sparcv8"
121 #elif defined(__sparcv9)
122 #define DOOBLE_ARCHITECTURE_STR "__sparcv9"
123 #elif defined(__sparc__)
124 #define DOOBLE_ARCHITECTURE_STR "__sparc__"
125 #elif defined(__sparc)
126 #define DOOBLE_ARCHITECTURE_STR "__sparc"
127 #else
128 #define DOOBLE_ARCHITECTURE_STR "gingerjitter"
129 #endif
130 #endif
131 
132 class swifty;
133 
134 class dooble_about: public QMainWindow
135 {
136  Q_OBJECT
137 
138  public:
139  dooble_about(void);
140  ~dooble_about();
141  void compute_self_digest(void);
142 
143  protected:
144  void keyPressEvent(QKeyEvent *event);
145 
146  private:
147  QFuture<void> m_future;
148  Ui_dooble_about m_ui;
149  swifty *m_swifty;
150  void compute_self_digest_task(const QString &file_path);
151 
152  private slots:
153  void slot_file_digest_computed(const QByteArray &digest);
154  void slot_link_activated(const QString &url);
155  void slot_swifty(void);
156 
157  signals:
158  void file_digest_computed(const QByteArray &digest);
159  void link_activated(const QUrl &url);
160 };
161 
162 #endif
Definition: dooble_about.h:135
Definition: dooble_swifty.h:36