Mon, 22 Jun 2015 01:44:30 +0300
Added the ability to automatically look up wad paths from other sources (for now just Doomseeker's configuration). By default, ZCinema will automatically do such a lookup if it fails to find a WAD needed for demo playback. This can also be invoked manually in the config prompt.
54
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
1 | #include <QLabel> |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
2 | #include <QTableWidget> |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
3 | #include "versionguientry.h" |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
4 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
5 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
6 | // ----------------------------------------------------------------------------- |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
7 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
8 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
9 | VersionGuiEntry::VersionGuiEntry (const QString& name, bool isRelease, |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
10 | QLabel* label, QTableWidgetItem* pathItem) |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
11 | : m_name (name), |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
12 | m_isRelease (isRelease), |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
13 | m_label (label), |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
14 | m_pathItem (pathItem) |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
15 | { |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
16 | updateStyleSheet(); |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
17 | } |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
18 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
19 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
20 | // ----------------------------------------------------------------------------- |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
21 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
22 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
23 | void VersionGuiEntry::setRelease (bool a) |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
24 | { |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
25 | m_isRelease = a; |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
26 | updateStyleSheet(); |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
27 | } |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
28 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
29 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
30 | // ----------------------------------------------------------------------------- |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
31 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
32 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
33 | void VersionGuiEntry::updateStyleSheet() |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
34 | { |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
35 | m_label->setStyleSheet (m_isRelease ? "font-weight: bold" : ""); |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
36 | } |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
37 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
38 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
39 | // ----------------------------------------------------------------------------- |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
40 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
41 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
42 | class QLabel* VersionGuiEntry::label() |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
43 | { |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
44 | return m_label; |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
45 | } |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
46 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
47 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
48 | // ----------------------------------------------------------------------------- |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
49 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
50 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
51 | class QTableWidgetItem* VersionGuiEntry::pathItem() |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
52 | { |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
53 | return m_pathItem; |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
54 | } |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
55 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
56 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
57 | // ----------------------------------------------------------------------------- |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
58 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
59 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
60 | const QString& VersionGuiEntry::name() |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
61 | { |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
62 | return m_name; |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
63 | } |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
64 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
65 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
66 | // ----------------------------------------------------------------------------- |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
67 | // |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
68 | |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
69 | bool VersionGuiEntry::isRelease() |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
70 | { |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
71 | return m_isRelease; |
0b3a5bc4e8a8
VersionGuiEntry is now a proper class.
Teemu Piippo <tsapii@utu.fi>
parents:
diff
changeset
|
72 | } |