blob: 04bff02ebb5489fb546b9c68c65990b295cefd0b [file] [log] [blame]
Jared Lindblom06405c42013-01-17 20:48:39 -08001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2012-2013 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Jared Lindblom <lindblom@cs.ucla.edu>
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -080019 * Alexander Afanasyev <alexander.afanasyev@ucla.edu>
20 * Zhenkai Zhu <zhenkai@cs.ucla.edu>
21 * Ilya Moiseenko <iliamo@ucla.edu>
Jared Lindblom06405c42013-01-17 20:48:39 -080022 */
23
24#include "chronosharegui.h"
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -080025
Alexander Afanasyev83a53002013-01-24 11:12:01 -080026#include "logging.h"
Alexander Afanasyev9ca444e2013-01-25 16:29:35 -080027#include "ccnx-wrapper.h"
Zhenkai Zhuf3ea97a2013-01-30 15:20:52 -080028#include <QValidator>
Zhenkai Zhuce04cb42013-02-25 15:29:31 -080029#include <QDir>
30#include <QDesktopServices>
Alexander Afanasyev9ca444e2013-01-25 16:29:35 -080031
32#include <boost/make_shared.hpp>
33
34using namespace boost;
35using namespace Ccnx;
Jared Lindblom06405c42013-01-17 20:48:39 -080036
Alexander Afanasyev83a53002013-01-24 11:12:01 -080037INIT_LOGGER ("Gui");
38
39ChronoShareGui::ChronoShareGui(QWidget *parent)
Jared Lindblomc8ffd592013-01-25 00:00:30 -080040 : QDialog(parent)
Zhenkai Zhud5756312013-01-31 13:49:45 -080041 , m_watcher(0)
42 , m_dispatcher(0)
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -080043#ifdef ADHOC_SUPPORTED
44 , m_executor (1)
45#endif
Jared Lindblom06405c42013-01-17 20:48:39 -080046{
Jared Lindblomf4b900e2013-02-07 18:08:47 -080047 setWindowTitle("Settings");
Jared Lindblomc8ffd592013-01-25 00:00:30 -080048
Jared Lindblomd8b76ad2013-02-07 20:37:37 -080049 labelUsername = new QLabel("Username (hint: /<username>)");
Jared Lindblomc8ffd592013-01-25 00:00:30 -080050 labelSharedFolder = new QLabel("Shared Folder Name");
51 labelSharedFolderPath = new QLabel("Shared Folder Path");
Zhenkai Zhuf3ea97a2013-01-30 15:20:52 -080052
Zhenkai Zhud5756312013-01-31 13:49:45 -080053 QRegExp regex("(/[^/]+)+$");
Zhenkai Zhuf3ea97a2013-01-30 15:20:52 -080054 QValidator *prefixValidator = new QRegExpValidator(regex, this);
55
Jared Lindblomc8ffd592013-01-25 00:00:30 -080056 editUsername = new QLineEdit();
Zhenkai Zhuf3ea97a2013-01-30 15:20:52 -080057 editUsername->setValidator(prefixValidator);
58
59 QRegExp noPureWhiteSpace("^\\S+.*$");
60 QValidator *wsValidator = new QRegExpValidator(noPureWhiteSpace, this);
Jared Lindblomc8ffd592013-01-25 00:00:30 -080061 editSharedFolder = new QLineEdit();
Zhenkai Zhuf3ea97a2013-01-30 15:20:52 -080062 editSharedFolder->setValidator(wsValidator);
63
Jared Lindblomc8ffd592013-01-25 00:00:30 -080064 editSharedFolderPath = new QLineEdit();
65 editSharedFolderPath->setReadOnly(true);
66 QPalette pal = editSharedFolderPath->palette();
67 pal.setColor(QPalette::Active, QPalette::Base, pal.color(QPalette::Disabled, QPalette::Base));
68 editSharedFolderPath->setPalette(pal);
69 button = new QPushButton("Submit");
70 label = new QLabel();
71
72 connect(button, SIGNAL(clicked()), this, SLOT(changeSettings()));
73
74 mainLayout = new QVBoxLayout; //vertically
75 mainLayout->addWidget(labelUsername);
76 mainLayout->addWidget(editUsername);
77 mainLayout->addWidget(labelSharedFolder);
78 mainLayout->addWidget(editSharedFolder);
79 mainLayout->addWidget(labelSharedFolderPath);
80 mainLayout->addWidget(editSharedFolderPath);
81 mainLayout->addWidget(button);
82 mainLayout->addWidget(label);
83 setLayout(mainLayout);
84
Alexander Afanasyev83a53002013-01-24 11:12:01 -080085 // create actions that result from clicking a menu option
86 createActions();
Jared Lindblomb4032e22013-01-17 23:50:51 -080087
Alexander Afanasyev83a53002013-01-24 11:12:01 -080088 // create tray icon
89 createTrayIcon();
Jared Lindblomb4032e22013-01-17 23:50:51 -080090
Alexander Afanasyev83a53002013-01-24 11:12:01 -080091 // set icon image
92 setIcon();
Jared Lindblom06405c42013-01-17 20:48:39 -080093
Alexander Afanasyev83a53002013-01-24 11:12:01 -080094 // show tray icon
95 m_trayIcon->show();
Alexander Afanasyev9e5a4702013-01-24 13:15:23 -080096
97 // Dispatcher(const boost::filesystem::path &path, const std::string &localUserName, const Ccnx::Name &localPrefix,
98 // const std::string &sharedFolder, const boost::filesystem::path &rootDir,
99 // Ccnx::CcnxWrapperPtr ccnx, SchedulerPtr scheduler, int poolSize = 2);
100
Zhenkai Zhud5756312013-01-31 13:49:45 -0800101 // load settings
102 if(!loadSettings())
103 {
104 // prompt user to choose folder
105 openMessageBox("First Time Setup", "Please enter a username, shared folder name and choose the shared folder path on your local filesystem.");
106 viewSettings();
107 openFileDialog();
108 viewSettings();
109 }
110 else
111 {
112 startBackend();
113 }
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -0800114
115#ifdef ADHOC_SUPPORTED
116 m_executor.start ();
117#endif
Zhenkai Zhud5756312013-01-31 13:49:45 -0800118}
119
120void
121ChronoShareGui::startBackend()
122{
123 if (m_watcher != 0 && m_dispatcher != 0)
124 {
125 return;
126 }
127
Alexander Afanasyev9ca444e2013-01-25 16:29:35 -0800128 m_dispatcher = new Dispatcher (m_username.toStdString (), m_sharedFolderName.toStdString (),
129 m_dirPath.toStdString (), make_shared<CcnxWrapper> ());
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800130
131 // Alex: this **must** be here, otherwise m_dirPath will be uninitialized
Alexander Afanasyev9ca444e2013-01-25 16:29:35 -0800132 m_watcher = new FsWatcher (m_dirPath,
133 bind (&Dispatcher::Did_LocalFile_AddOrModify, m_dispatcher, _1),
Zhenkai Zhud1756272013-02-01 17:02:18 -0800134 bind (&Dispatcher::Did_LocalFile_Delete, m_dispatcher, _1));
Jared Lindblom06405c42013-01-17 20:48:39 -0800135}
136
137ChronoShareGui::~ChronoShareGui()
138{
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -0800139#ifdef ADHOC_SUPPORTED
140 m_executor.shutdown ();
141#endif
142
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800143 delete m_watcher; // stop filewatching ASAP
Alexander Afanasyev9ca444e2013-01-25 16:29:35 -0800144 delete m_dispatcher; // stop dispatcher ASAP, but after watcher (to prevent triggering callbacks on deleted object)
Alexander Afanasyev9e5a4702013-01-24 13:15:23 -0800145
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800146 // cleanup
147 delete m_trayIcon;
148 delete m_trayIconMenu;
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -0800149#ifdef ADHOC_SUPPORTED
150 delete m_wifiAction;
151#endif
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800152 delete m_openFolder;
153 delete m_viewSettings;
154 delete m_changeFolder;
155 delete m_quitProgram;
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800156
157 delete labelUsername;
158 delete labelSharedFolder;
159 delete editUsername;
160 delete editSharedFolder;
161 delete button;
162 delete label;
163 delete mainLayout;
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800164}
165
166void ChronoShareGui::openMessageBox(QString title, QString text)
167{
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800168 QMessageBox messageBox(this);
169 messageBox.setWindowTitle(title);
170 messageBox.setText(text);
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800171
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800172 messageBox.setIconPixmap(QPixmap(":/images/friends-group-icon.png"));
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800173
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800174 messageBox.exec();
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800175}
176
177void ChronoShareGui::openMessageBox(QString title, QString text, QString infotext)
178{
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800179 QMessageBox messageBox(this);
180 messageBox.setWindowTitle(title);
181 messageBox.setText(text);
182 messageBox.setInformativeText(infotext);
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800183
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800184 messageBox.setIconPixmap(QPixmap(":/images/friends-group-icon.png"));
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800185
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800186 messageBox.exec();
Jared Lindblom06405c42013-01-17 20:48:39 -0800187}
188
189void ChronoShareGui::createActions()
190{
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -0800191 _LOG_DEBUG ("Create actions");
192
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800193 // create the "open folder" action
194 m_openFolder = new QAction(tr("&Open Folder"), this);
195 connect(m_openFolder, SIGNAL(triggered()), this, SLOT(openSharedFolder()));
Jared Lindblom06405c42013-01-17 20:48:39 -0800196
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800197 // create the "view settings" action
198 m_viewSettings = new QAction(tr("&View Settings"), this);
199 connect(m_viewSettings, SIGNAL(triggered()), this, SLOT(viewSettings()));
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800200
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800201 // create the "change folder" action
202 m_changeFolder = new QAction(tr("&Change Folder"), this);
203 connect(m_changeFolder, SIGNAL(triggered()), this, SLOT(openFileDialog()));
Jared Lindblomb4032e22013-01-17 23:50:51 -0800204
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -0800205#ifdef ADHOC_SUPPORTED
206 // create "AdHoc Wifi" action
207 m_wifiAction = new QAction (tr("Enable AdHoc &WiFI"), m_trayIconMenu);
208 m_wifiAction->setChecked (false);
209 m_wifiAction->setCheckable (true);
210 connect (m_wifiAction, SIGNAL (toggled(bool)), this, SLOT(onAdHocChange(bool)));
211#endif
212
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800213 // create the "quit program" action
214 m_quitProgram = new QAction(tr("&Quit"), this);
215 connect(m_quitProgram, SIGNAL(triggered()), qApp, SLOT(quit()));
Jared Lindblom06405c42013-01-17 20:48:39 -0800216}
217
218void ChronoShareGui::createTrayIcon()
219{
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800220 // create a new icon menu
221 m_trayIconMenu = new QMenu(this);
Jared Lindblom06405c42013-01-17 20:48:39 -0800222
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800223 // add actions to the menu
224 m_trayIconMenu->addAction(m_openFolder);
225 m_trayIconMenu->addSeparator();
226 m_trayIconMenu->addAction(m_viewSettings);
227 m_trayIconMenu->addAction(m_changeFolder);
228 m_trayIconMenu->addSeparator();
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -0800229 m_trayIconMenu->addAction(m_wifiAction);
230 m_trayIconMenu->addSeparator();
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800231 m_trayIconMenu->addAction(m_quitProgram);
Jared Lindblom06405c42013-01-17 20:48:39 -0800232
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800233 // create new tray icon
234 m_trayIcon = new QSystemTrayIcon(this);
Jared Lindblomb4032e22013-01-17 23:50:51 -0800235
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -0800236#ifdef ADHOC_SUPPORTED
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800237 // associate the menu with the tray icon
238 m_trayIcon->setContextMenu(m_trayIconMenu);
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -0800239#endif
Jared Lindblomb4032e22013-01-17 23:50:51 -0800240
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800241 // handle left click of icon
242 connect(m_trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconClicked(QSystemTrayIcon::ActivationReason)));
Jared Lindblom06405c42013-01-17 20:48:39 -0800243}
244
Alexander Afanasyev85a4ba02013-02-24 16:30:17 -0800245void
246ChronoShareGui::onAdHocChange (bool state)
247{
248#ifdef ADHOC_SUPPORTED
249 if (m_wifiAction->isChecked ())
250 {
251 QMessageBox msgBox;
252 msgBox.setText ("WARNING: your WiFi will be disconnected");
253 msgBox.setIcon (QMessageBox::Warning);
254 msgBox.setInformativeText("AdHoc WiFi will disconnect your current WiFi.\n Are you sure that you are OK with that?");
255 msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
256 msgBox.setDefaultButton(QMessageBox::Cancel);
257 int ret = msgBox.exec();
258
259 if (ret == QMessageBox::Cancel)
260 {
261 m_wifiAction->setChecked (false);
262 }
263 else
264 {
265
266 m_wifiAction->setText (tr("Disable AdHoc WiFI"));
267
268 // create adhoc
269 m_executor.execute (Adhoc::CreateAdhoc);
270 }
271 }
272 else
273 {
274 m_wifiAction->setText (tr("Enable AdHoc WiFI"));
275
276 // disable adhoc
277 m_executor.execute (Adhoc::DestroyAdhoc);
278
279 // a trick in DestroyAdhoc ensures that WiFi will be reconnected to a default WiFi
280 }
281#endif
282}
283
Jared Lindblom06405c42013-01-17 20:48:39 -0800284void ChronoShareGui::setIcon()
285{
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800286 // set the icon image
287 m_trayIcon->setIcon(QIcon(":/images/friends-group-icon.png"));
Jared Lindblom06405c42013-01-17 20:48:39 -0800288}
289
290void ChronoShareGui::openSharedFolder()
291{
Zhenkai Zhuce04cb42013-02-25 15:29:31 -0800292 QString path = QDir::toNativeSeparators(m_dirPath);
293 QDesktopServices::openUrl(QUrl("file:///" + path));
Jared Lindblom06405c42013-01-17 20:48:39 -0800294}
Jared Lindblomb4032e22013-01-17 23:50:51 -0800295
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800296void ChronoShareGui::changeSettings()
297{
298 if(!editUsername->text().isEmpty())
Zhenkai Zhuf3ea97a2013-01-30 15:20:52 -0800299 m_username = editUsername->text().trimmed();
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800300 else
301 editUsername->setText(m_username);
302
303 if(!editSharedFolder->text().isEmpty())
Zhenkai Zhuf3ea97a2013-01-30 15:20:52 -0800304 m_sharedFolderName = editSharedFolder->text().trimmed();
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800305 else
306 editSharedFolder->setText(m_sharedFolderName);
307
308 saveSettings();
309 this->hide();
Zhenkai Zhud5756312013-01-31 13:49:45 -0800310
311 startBackend();
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800312}
313
Jared Lindblomb4032e22013-01-17 23:50:51 -0800314void ChronoShareGui::openFileDialog()
315{
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800316 // prompt user for new directory
317 QString tempPath = QFileDialog::getExistingDirectory(this, tr("Choose a new folder"),
Alexander Afanasyev9e5a4702013-01-24 13:15:23 -0800318 m_dirPath, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
319 QFileInfo qFileInfo (tempPath);
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800320
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800321 if(qFileInfo.isDir())
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800322 {
323 m_dirPath = tempPath;
324 editSharedFolderPath->setText(m_dirPath);
325 }
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800326 else
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800327 {
328 openMessageBox ("Error", "Not a valid folder, Ignoring.");
329 }
Jared Lindblomb4032e22013-01-17 23:50:51 -0800330
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800331 _LOG_DEBUG ("Selected path: " << m_dirPath.toStdString ());
Jared Lindblomb4032e22013-01-17 23:50:51 -0800332
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800333 // save settings
334 saveSettings();
Jared Lindblomb4032e22013-01-17 23:50:51 -0800335}
336
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800337void ChronoShareGui::trayIconClicked (QSystemTrayIcon::ActivationReason reason)
Jared Lindblomb4032e22013-01-17 23:50:51 -0800338{
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800339 // if double clicked, open shared folder
340 if(reason == QSystemTrayIcon::DoubleClick)
Jared Lindblomb4032e22013-01-17 23:50:51 -0800341 {
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800342 openSharedFolder();
Jared Lindblomb4032e22013-01-17 23:50:51 -0800343 }
344}
345
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800346void ChronoShareGui::viewSettings()
Jared Lindblomb4032e22013-01-17 23:50:51 -0800347{
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800348 //simple for now
349 this->show();
Zhenkai Zhud5756312013-01-31 13:49:45 -0800350 this->raise();
351 this->activateWindow();
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800352}
353
354bool ChronoShareGui::loadSettings()
355{
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800356 bool successful = true;
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800357
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800358 // Load Settings
359 // QSettings settings(m_settingsFilePath, QSettings::NativeFormat);
360 QSettings settings (QSettings::NativeFormat, QSettings::UserScope, "irl.cs.ucla.edu", "ChronoShare");
Jared Lindblom5d7e51e2013-01-18 00:59:34 -0800361
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800362 // _LOG_DEBUG (lexical_cast<string> (settings.allKeys()));
363
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800364 if(settings.contains("username"))
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800365 {
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800366 m_username = settings.value("username", "admin").toString();
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800367 }
368 else
369 {
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800370 successful = false;
371 }
372
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800373 editUsername->setText(m_username);
374
375 if(settings.contains("sharedfoldername"))
376 {
377 m_sharedFolderName = settings.value("sharedfoldername", "shared").toString();
378 }
379 else
380 {
381 successful = false;
382 }
383
384 editSharedFolder->setText(m_sharedFolderName);
385
386 if(settings.contains("dirPath"))
387 {
388 m_dirPath = settings.value("dirPath", QDir::homePath()).toString();
389 }
390 else
391 {
392 successful = false;
393 }
394
395 editSharedFolderPath->setText(m_dirPath);
396
397 _LOG_DEBUG ("Found configured path: " << (successful ? m_dirPath.toStdString () : std::string("no")));
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800398
399 return successful;
Jared Lindblomb4032e22013-01-17 23:50:51 -0800400}
401
402void ChronoShareGui::saveSettings()
403{
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800404 // Save Settings
405 // QSettings settings(m_settingsFilePath, QSettings::NativeFormat);
406 QSettings settings (QSettings::NativeFormat, QSettings::UserScope, "irl.cs.ucla.edu", "ChronoShare");
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800407
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800408 settings.setValue("dirPath", m_dirPath);
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800409 settings.setValue("username", m_username);
410 settings.setValue("sharedfoldername", m_sharedFolderName);
Jared Lindblomb4032e22013-01-17 23:50:51 -0800411}
412
413void ChronoShareGui::closeEvent(QCloseEvent* event)
414{
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800415 _LOG_DEBUG ("Close Event")
Jared Lindblomc8ffd592013-01-25 00:00:30 -0800416 this->hide();
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800417 event->ignore(); // don't let the event propagate to the base class
Jared Lindblomb4032e22013-01-17 23:50:51 -0800418}
Jared Lindblomdc845f02013-01-18 17:29:40 -0800419
420#if WAF
421#include "chronosharegui.moc"
422#include "chronosharegui.cpp.moc"
Alexander Afanasyev83a53002013-01-24 11:12:01 -0800423#endif