/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
 * Copyright (c) 2012-2013 University of California, Los Angeles
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Jared Lindblom <lindblom@cs.ucla.edu>
 */

#ifndef CHRONOSHAREGUI_H
#define CHRONOSHAREGUI_H

#include <QtGui>
#include <QWidget>
#include <QSystemTrayIcon>
#include <QMenu>
#include <QDebug>
#include <QProcess>
#include <QSettings>
#include <QDir>
#include <QFileDialog>
#include <QCloseEvent>
#include <QMessageBox>
#include <QApplication>

#include "fs-watcher.h"
#include "dispatcher.h"

class ChronoShareGui : public QDialog
{
  Q_OBJECT

  public:
  // constructor
  explicit ChronoShareGui(QWidget* parent = 0);

  // destructor
  ~ChronoShareGui();

private slots:
  // open the shared folder
  void openSharedFolder();

  // open file dialog
  void openFileDialog();

  // handle left click of tray icon
  void trayIconClicked(QSystemTrayIcon::ActivationReason reason);

  // view chronoshare settings
  void viewSettings();

  // change chronoshare settings
  void changeSettings();

private:
  // create actions that result from clicking a menu option
  void createActions();

  // create tray icon
  void createTrayIcon();

  // set icon image
  void setIcon();

  // load persistent settings
  bool loadSettings();

  // save persistent settings
  void saveSettings();

  // prompt user dialog box
  void openMessageBox(QString title, QString text);

  // overload
  void openMessageBox(QString title, QString text, QString infotext);

  // capture close event
  void closeEvent(QCloseEvent* event);

private:
  QSystemTrayIcon* m_trayIcon; // tray icon
  QMenu* m_trayIconMenu; // tray icon menu

  QAction* m_openFolder; // open the shared folder action
  QAction* m_viewSettings; // chronoShare settings
  QAction* m_changeFolder; // change the shared folder action
  QAction* m_quitProgram; // quit program action

  QString m_dirPath; // shared directory
  QString m_username; // username
  QString m_sharedFolderName; // shared folder name

  FsWatcher  *m_watcher;
  Dispatcher *m_dispatcher;

  QLabel* labelUsername;
  QPushButton* button;
  QLabel* labelSharedFolder;
  QLabel* labelSharedFolderPath;
  QLineEdit* editUsername;
  QLineEdit* editSharedFolder;
  QLineEdit* editSharedFolderPath;
  QLabel *label;
  QVBoxLayout *mainLayout;

  // QString m_settingsFilePath; // settings file path
  // QString m_settings;
};

#endif // CHRONOSHAREGUI_H
