SeafileTrayIcon::SeafileTrayIcon(QObject *parent) : QSystemTrayIcon(parent), nth_trayicon_(0), rotate_counter_(0) { setState(STATE_DAEMON_DOWN); rotate_timer_ = new QTimer(this); connect(rotate_timer_, SIGNAL(timeout()), this, SLOT(rotateTrayIcon())); refresh_timer_ = new QTimer(this); connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIcon())); createActions(); createContextMenu(); connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(onActivated(QSystemTrayIcon::ActivationReason))); connect(SeahubNotificationsMonitor::instance(), SIGNAL(notificationsChanged()), this, SLOT(onSeahubNotificationsChanged())); hide(); #if defined(Q_WS_MAC) tnm = new TrayNotificationManager(this); #endif }
SeafileTrayIcon::SeafileTrayIcon(QObject *parent) : QSystemTrayIcon(parent), nth_trayicon_(0), rotate_counter_(0) { setToolTip(SEAFILE_CLIENT_BRAND); setState(STATE_DAEMON_DOWN); rotate_timer_ = new QTimer(this); connect(rotate_timer_, SIGNAL(timeout()), this, SLOT(rotateTrayIcon())); refresh_timer_ = new QTimer(this); connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIcon())); createActions(); createContextMenu(); connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(onActivated(QSystemTrayIcon::ActivationReason))); hide(); #if defined(Q_WS_MAC) tnm = new TrayNotificationManager(this); #endif }
SeafileTrayIcon::SeafileTrayIcon(QObject *parent) : QSystemTrayIcon(parent), nth_trayicon_(0), rotate_counter_(0), state_(STATE_DAEMON_UP) { setState(STATE_DAEMON_DOWN); rotate_timer_ = new QTimer(this); connect(rotate_timer_, SIGNAL(timeout()), this, SLOT(rotateTrayIcon())); refresh_timer_ = new QTimer(this); connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIcon())); connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIconToolTip())); createActions(); createContextMenu(); connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(onActivated(QSystemTrayIcon::ActivationReason))); connect(SeahubNotificationsMonitor::instance(), SIGNAL(notificationsChanged()), this, SLOT(onSeahubNotificationsChanged())); #if defined(Q_OS_WIN32) || (defined(Q_OS_MAC) && (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0))) connect(this, SIGNAL(messageClicked()), this, SLOT(onMessageClicked())); #endif hide(); createGlobalMenuBar(); #if defined(Q_OS_MAC) tnm = new TrayNotificationManager(this); #endif }
SeafileTrayIcon::SeafileTrayIcon(QObject *parent) : QSystemTrayIcon(parent), nth_trayicon_(0), rotate_counter_(0), state_(STATE_DAEMON_UP), next_message_msec_(0), sync_errors_dialog_(nullptr), about_dialog_(nullptr), log_dir_uploader_(nullptr) { setState(STATE_DAEMON_DOWN); rotate_timer_ = new QTimer(this); connect(rotate_timer_, SIGNAL(timeout()), this, SLOT(rotateTrayIcon())); refresh_timer_ = new QTimer(this); connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIcon())); connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(refreshTrayIconToolTip())); #if defined(Q_OS_WIN32) connect(refresh_timer_, SIGNAL(timeout()), this, SLOT(checkTrayIconMessageQueue())); #endif createActions(); createContextMenu(); connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(onActivated(QSystemTrayIcon::ActivationReason))); #if !defined(Q_OS_LINUX) connect(this, SIGNAL(messageClicked()), this, SLOT(onMessageClicked())); #endif hide(); createGlobalMenuBar(); #if defined(Q_OS_MAC) tnm = new TrayNotificationManager(this); #endif }