diff --git a/CMakeLists.txt b/CMakeLists.txt index 8359f2706..2947f50a3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -341,7 +341,6 @@ set(APP_SOURCES src/gui/dialogs/formdatabasecleanup.cpp src/gui/dialogs/formbackupdatabasesettings.cpp src/gui/dialogs/formrestoredatabasesettings.cpp - src/gui/notifications/notification.cpp src/gui/systemtrayicon.cpp src/gui/baselineedit.cpp src/gui/locationlineedit.cpp @@ -455,7 +454,6 @@ set(APP_HEADERS src/gui/dialogs/formrestoredatabasesettings.h src/gui/dialogs/formdatabasecleanup.h src/gui/dialogs/formupdate.h - src/gui/notifications/notification.h src/gui/systemtrayicon.h src/gui/baselineedit.h src/gui/locationlineedit.h @@ -702,7 +700,6 @@ include_directories ( ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/gui ${CMAKE_SOURCE_DIR}/src/gui/dialogs - ${CMAKE_SOURCE_DIR}/src/gui/notifications ${CMAKE_SOURCE_DIR}/src/network-web ${CMAKE_SOURCE_DIR}/src/network-web/adblock ${CMAKE_SOURCE_DIR}/src/dynamic-shortcuts diff --git a/src/gui/notifications/notification.cpp b/src/gui/notifications/notification.cpp deleted file mode 100644 index 9f0825727..000000000 --- a/src/gui/notifications/notification.cpp +++ /dev/null @@ -1,68 +0,0 @@ -// This file is part of RSS Guard. -// -// Copyright (C) 2011-2015 by Martin Rotter -// -// RSS Guard is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// RSS Guard 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 RSS Guard. If not, see . - -#include "gui/notifications/notification.h" - -#if defined(Q_OS_MAC) -#include -#endif - - -Notification::Notification() : QWidget(0) { - setupWidget(); -} - -Notification::~Notification() { -} - -void Notification::setupWidget() { - // Set window flags. - Qt::WindowFlags window_flags = Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | - Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint | - Qt::WindowDoesNotAcceptFocus; - -#if defined (Q_OS_MAC) - window_flags |= Qt::SubWindow; -#else - window_flags |= Qt::Tool; -#endif - - setWindowFlags(window_flags); - - // Set widget attributes. - setAttribute(Qt::WA_TranslucentBackground); - setAttribute(Qt::WA_X11DoNotAcceptFocus); - setAttribute(Qt::WA_ShowWithoutActivating); - -#if defined (Q_OS_MAC) - winId(); - - int setAttr[] = {kHIWindowBitDoesNotHide, kHIWindowBitDoesNotCycle, kHIWindowBitNoShadow, 0}; - int clearAttr[] = {0}; - HIWindowChangeAttributes(qt_mac_window_for(this), setAttr, clearAttr); -#endif - - // Window will be meant to be on top, but should not steal focus. - setFocusPolicy(Qt::NoFocus); - - // TODO: pokracovat - // https://github.com/binaryking/QNotify/blob/master/QNotify.cpp - // http://stackoverflow.com/questions/5823700/notification-window-in-mac-with-or-without-qt - // quiterss - // a odkazy z issue - // promyslet esli tam dat jen ciste label a ikonu, nebo i seznam nejnovesich zprav atp. -} diff --git a/src/gui/notifications/notification.h b/src/gui/notifications/notification.h deleted file mode 100644 index 9b4e70f49..000000000 --- a/src/gui/notifications/notification.h +++ /dev/null @@ -1,40 +0,0 @@ -// This file is part of RSS Guard. -// -// Copyright (C) 2011-2015 by Martin Rotter -// -// RSS Guard is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// RSS Guard 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 RSS Guard. If not, see . - -#ifndef NOTIFICATION_H -#define NOTIFICATION_H - -#include - - -class Notification : public QWidget { - Q_OBJECT - - public: - explicit Notification(); - virtual ~Notification(); - - signals: - - public slots: - - private: - void setupWidget(); - -}; - -#endif // NOTIFICATION_H