forked from BlurryLight/qtcreator-wakatime
-
Notifications
You must be signed in to change notification settings - Fork 2
/
waka_options_page.cpp
46 lines (37 loc) · 1005 Bytes
/
waka_options_page.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "waka_options_page.h"
#include "waka_constants.h"
#include "waka_options.h"
#include <QCoreApplication>
namespace Wakatime {
namespace Internal {
WakaOptionsPage::WakaOptionsPage(const QSharedPointer<WakaOptions> &options, QObject *parent) : Core::IOptionsPage(parent), _options(options)
{
setId(Constants::OPTION_ID);
setDisplayName(tr("General"));
setCategory(Constants::OPTION_CATEGORY);
setDisplayCategory(QCoreApplication::translate("Wakatime", "Wakatime"));
setCategoryIcon(Utils::Icon({{":/logo.png", Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint));
}
QWidget *WakaOptionsPage::widget()
{
_options->read();
if(!_widget)
{
_widget = new WakaOptionsWidget(_options);
}
_widget->restore();
return _widget;
}
void WakaOptionsPage::apply()
{
if(_widget)
{
_widget->apply();
}
}
void WakaOptionsPage::finish()
{
// Implement the ok button functionality
}
} // namespace Internal
} // namespace QtCreatorWakatime