1 /* ============================================================ 2 * QuiteRSS is a open-source cross-platform RSS/Atom news feeds reader 3 * Copyright (C) 2011-2020 QuiteRSS Team <quiterssteam@gmail.com> 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 as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <https://www.gnu.org/licenses/>. 17 * ============================================================ */ 18 #ifndef MAINWINDOW_H 19 #define MAINWINDOW_H 20 21 #ifdef HAVE_QT5 22 #include <QtWidgets> 23 #include <QMediaPlayer> 24 #include <QMediaPlaylist> 25 #else 26 #include <QtGui> 27 #ifdef HAVE_PHONON 28 #include <phonon/audiooutput.h> 29 #include <phonon/mediaobject.h> 30 #endif 31 #endif 32 #include <QtSql> 33 #include <QtWebKit> 34 #include <QPrintDialog> 35 #include <QPrintPreviewDialog> 36 #include <QPrinter> 37 #include <QSound> 38 39 #include "categoriestreewidget.h" 40 #include "feedsmodel.h" 41 #include "feedsview.h" 42 #include "findfeed.h" 43 #include "newsheader.h" 44 #include "newsmodel.h" 45 #include "newstabwidget.h" 46 #include "newsview.h" 47 #include "notificationswidget.h" 48 #include "tabbar.h" 49 #include "optionsdialog.h" 50 #include "updateappdialog.h" 51 #include "webview.h" 52 #include "parseobject.h" 53 #include "toolbutton.h" 54 55 #define TAB_WIDGET_PERMANENT 0 56 57 #define NEW_TAB_FOREGROUND 1 58 #define NEW_TAB_BACKGROUND 2 59 60 #define MAX_TAB_WIDTH 150 61 62 enum FeedReedType { 63 FeedReadSwitchingFeed, 64 FeedReadClosingTab, 65 FeedReadPlaceToTray, 66 FeedReadTypeCount, 67 FeedReadSwitchingTab 68 }; 69 70 class AdBlockIcon; 71 72 class MainWindow : public QMainWindow 73 { 74 Q_OBJECT 75 public: 76 explicit MainWindow(QWidget *parent = 0); 77 ~MainWindow(); 78 79 void loadSettings(); 80 void saveSettings(); 81 82 bool showSplashScreen_; 83 bool showTrayIcon_; 84 bool startingTray_; 85 bool isMinimizeToTray_; 86 QSystemTrayIcon *traySystem; 87 88 QString getIdFeedsString(int idFolder, int idException = -1); 89 void recountCategoryCounts(); 90 91 void setToolBarStyle(const QString &styleStr); 92 void setToolBarIconSize(QToolBar *toolbar, const QString &iconSizeStr); 93 nameLabels()94 static QStringList nameLabels() { 95 QStringList nameLabels; 96 nameLabels << "Important" << "Work" << "Personal" 97 << "To Do" << "Later" << "Amusingly"; 98 return nameLabels; 99 } trNameLabels()100 static QStringList trNameLabels() { 101 QStringList trNameLabels; 102 trNameLabels << tr("Important") << tr("Work") << tr("Personal") 103 << tr("To Do") << tr("Later") << tr("Amusingly"); 104 return trNameLabels; 105 } 106 107 QSqlDatabase db_; 108 FeedsModel *feedsModel_; 109 FeedsProxyModel *feedsProxyModel_; 110 FeedsView *feedsView_; 111 CategoriesTreeWidget *categoriesTree_; 112 QStackedWidget *stackedWidget_; 113 114 bool showFeedsTabPermanent_; 115 116 NewsTabWidget *currentNewsTab; 117 118 QAction *newsToolbarToggle_; 119 QAction *browserToolbarToggle_; 120 QAction *categoriesPanelToggle_; 121 QAction *statusBarToggle_; 122 QAction *newsFilter_; 123 QAction *openDescriptionNewsAct_; 124 QAction *openInBrowserAct_; 125 QAction *openInExternalBrowserAct_; 126 QAction *openNewsNewTabAct_; 127 QAction *openNewsBackgroundTabAct_; 128 QAction *markNewsRead_; 129 QAction *markAllNewsRead_; 130 QAction *markStarAct_; 131 QAction *updateFeedAct_; 132 QAction *deleteNewsAct_; 133 QAction *deleteAllNewsAct_; 134 QAction *newsKeyUpAct_; 135 QAction *newsKeyDownAct_; 136 QAction *newsKeyPageUpAct_; 137 QAction *newsKeyPageDownAct_; 138 QAction *prevUnreadNewsAct_; 139 QAction *nextUnreadNewsAct_; 140 QAction *autoLoadImagesToggle_; 141 QAction *printAct_; 142 QAction *printPreviewAct_; 143 QAction *savePageAsAct_; 144 QAction *savePageAsDescriptAct_; 145 QAction *restoreNewsAct_; 146 QAction *restoreLastNewsAct_; 147 QAction *newsLabelAction_; 148 QAction *newsLabelMenuAction_; 149 QAction *showLabelsMenuAct_; 150 QAction *findTextAct_; 151 QAction *openHomeFeedAct_; 152 QAction *shareMenuAct_; 153 QAction *emailShareAct_; 154 QAction *evernoteShareAct_; 155 QAction *facebookShareAct_; 156 QAction *livejournalShareAct_; 157 QAction *pocketShareAct_; 158 QAction *twitterShareAct_; 159 QAction *vkShareAct_; 160 QAction *linkedinShareAct_; 161 QAction *bloggerShareAct_; 162 QAction *printfriendlyShareAct_; 163 QAction *instapaperShareAct_; 164 QAction *redditShareAct_; 165 QAction *hackerNewsShareAct_; 166 QAction *telegramShareAct_; 167 QAction *viberShareAct_; 168 QAction *copyLinkAct_; 169 QAction *pageUpWebViewAct_; 170 QAction *pageDownWebViewAct_; 171 QAction *nextFolderAct_; 172 QAction *prevFolderAct_; 173 QAction *expandFolderAct_; 174 QAction *closeTabAct_; 175 QAction *closeOtherTabsAct_; 176 QAction *closeAllTabsAct_; 177 QAction *settingPageLabelsAct_; 178 QAction *backWebPageAct_; 179 QAction *forwardWebPageAct_; 180 QAction *reloadWebPageAct_; 181 182 QActionGroup *newsFilterGroup_; 183 QActionGroup *newsLabelGroup_; 184 QActionGroup *shareGroup_; 185 186 QMenu *newsLabelMenu_; 187 QMenu *shareMenu_; 188 QMenu *newsSortByMenu_; 189 190 QString newsListFontFamily_; 191 int newsListFontSize_; 192 QString newsTitleFontFamily_; 193 int newsTitleFontSize_; 194 QString newsTextFontFamily_; 195 int newsTextFontSize_; 196 QString notificationFontFamily_; 197 int notificationFontSize_; 198 QString newsListTextColor_; 199 QString newsListBackgroundColor_; 200 QString newNewsTextColor_; 201 QString unreadNewsTextColor_; 202 QString focusedNewsTextColor_; 203 QString focusedNewsBGColor_; 204 QString linkColor_; 205 QString titleColor_; 206 QString dateColor_; 207 QString authorColor_; 208 QString newsTextColor_; 209 QString newsTitleBackgroundColor_; 210 QString newsBackgroundColor_; 211 QString alternatingRowColors_; 212 QString notifierTextColor_; 213 QString notifierBackgroundColor_; 214 QString formatDate_; 215 QString formatTime_; 216 217 bool markNewsReadOn_; 218 bool markCurNewsRead_; 219 int markNewsReadTime_; 220 bool markPrevNewsRead_; 221 bool markReadSwitchingFeed_; 222 bool markReadClosingTab_; 223 bool markReadMinimize_; 224 bool showDescriptionNews_; 225 bool alternatingRowColorsNews_; 226 bool simplifiedDateTime_; 227 bool notDeleteStarred_; 228 bool notDeleteLabeled_; 229 bool markIdenticalNewsRead_; 230 bool avoidOldNews_; 231 QDate avoidedOldNewsDate_; 232 233 bool autoLoadImages_; 234 bool openLinkInBackground_; 235 bool isOpeningLink_; //!< Flag - link is being opened 236 bool openLinkInBackgroundEmbedded_; 237 238 int externalBrowserOn_; 239 QString externalBrowser_; 240 bool javaScriptEnable_; 241 bool pluginsEnable_; 242 int maxPagesInCache_; 243 QString downloadLocation_; 244 bool askDownloadLocation_; 245 int defaultZoomPages_; 246 247 int newsLayout_; 248 int browserPosition_; 249 250 QString newsFilterStr; 251 252 int oldState; 253 254 bool hideFeedsOpenTab_; 255 bool showToggleFeedsTree_; 256 bool defaultIconFeeds_; 257 258 int openNewsTab_; 259 260 int screenNotify_; 261 int positionNotify_; 262 int transparencyNotify_; 263 int countShowNewsNotify_; 264 int widthTitleNewsNotify_; 265 int timeShowNewsNotify_; 266 bool showTitlesFeedsNotify_; 267 bool showIconFeedNotify_; 268 bool showButtonMarkAllNotify_; 269 bool showButtonMarkReadNotify_; 270 bool showButtonExBrowserNotify_; 271 bool showButtonDeleteNotify_; 272 bool closeNotify_; 273 QList<int> idFeedsNotifyList_; 274 adBlockIcon()275 AdBlockIcon *adBlockIcon() { return adblockIcon_; } 276 277 void webViewFullScreen(bool on); 278 279 public slots: 280 void restoreFeedsOnStartUp(); 281 void addFeed(); 282 void addFolder(); 283 void deleteItemFeedsTree(); 284 void slotImportFeeds(); 285 void slotExportFeeds(); 286 void slotFeedClicked(QModelIndex index); 287 void slotFeedSelected(QModelIndex index, bool createTab = false); 288 void setFeedsFilter(bool clicked = true); 289 void slotGetFeed(); 290 void slotGetAllFeeds(); 291 void slotStopUpdate(); 292 void showProgressBar(int addToMaximum); 293 void slotSetValue(int value); 294 void showMessageStatusBar(QString message, int timeout = 0); 295 void slotCountsStatusBar(int unreadCount, int allCount); 296 void slotPlaySound(const QString &path); 297 void slotAddColorList(int id, const QString &color); 298 void showOptionDlg(int index = -1); 299 void slotPlaceToTray(); 300 void slotActivationTray(QSystemTrayIcon::ActivationReason reason); 301 void slotTrayOpenNotifyTimer(); 302 void showWindows(bool trayClick = false); 303 void quitApp(); 304 void myEmptyWorkingSet(); 305 void slotUpdateFeed(int feedId, bool changed, int newCount, bool finish); 306 void slotFeedCountsUpdate(FeedCountStruct counts); 307 void slotUpdateNews(int refresh); 308 void slotUpdateStatus(int feedId, bool changed = true); 309 void setNewsFilter(QAction*, bool clicked = true); 310 void slotCloseTab(int index); 311 QWebPage *createWebTab(QUrl url = QUrl()); 312 void feedsModelReload(bool checkFilter = false); 313 void setStatusFeed(int feedId, QString status); 314 void slotPrint(QWebFrame *frame = 0); 315 void slotPrintPreview(QWebFrame* frame = 0); 316 317 signals: 318 void signalQuitApp(); 319 void signalPlaceToTray(); 320 void signalGetFeedTimer(int feedId); 321 void signalGetAllFeedsTimer(); 322 void signalGetFeed(int feedId, QString feedUrl, QDateTime date, int auth); 323 void signalGetFeedsFolder(QString query); 324 void signalGetAllFeeds(); 325 void signalStopUpdate(); 326 void signalImportFeeds(QByteArray xmlData); 327 void signalRequestUrl(int feedId, QString urlString, 328 QDateTime date, QString userInfo); 329 void faviconRequestUrl(QString urlString, QString feedUrl); 330 void signalIconFeedReady(QString feedUrl, QByteArray faviconData); 331 void signalSetCurrentTab(int index, bool updateTab = false); 332 void signalShowNotification(bool bShowRecentNews=false); 333 void signalRefreshInfoTray(); 334 void signalNextUpdate(bool finish); 335 void signalRecountCategoryCounts(); 336 void signalRecountFeedCounts(int feedId, bool update = true); 337 void signalSetFeedRead(int readType, int feedId, int idException, QList<int> idNewsList); 338 void signalPlaySoundNewNews(); 339 void signalUpdateStatus(int feedId, bool changed); 340 void signalMarkAllFeedsRead(); 341 void signalMarkFeedRead(int id, bool isFolder, bool openFeed); 342 void signalRefreshNewsView(int nextUnread); 343 void signalSetFeedsFilter(bool clicked = false); 344 void signalMarkAllFeedsOld(); 345 void signalMarkReadCategory(int type, int idLabel); 346 347 private slots: 348 void showMainMenu(); 349 void slotTimerLinkOpening(); 350 void slotVisibledFeedsWidget(); 351 void updateIconToolBarNull(bool feedsWidgetVisible); 352 void setFeedRead(int type, int feedId, FeedReedType feedReadType, 353 NewsTabWidget *widgetTab = 0, int idException = -1); 354 void markFeedRead(); 355 void slotRecountCategoryCounts(QList<int> deletedList, QList<int> starredList, 356 QList<int> readList, QStringList labelList); 357 void slotFeedsViewportUpdate(); 358 void slotPlaySoundNewNews(); 359 360 #ifdef HAVE_QT5 361 void mediaStatusChanged(QMediaPlayer::MediaStatus status); 362 void mediaError(QMediaPlayer::Error error); 363 #endif 364 #ifdef HAVE_PHONON 365 void mediaStateChanged(Phonon::State newstate, Phonon::State oldstate); 366 #endif 367 368 void slotShowAboutDlg(); 369 370 void showContextMenuFeed(const QPoint & pos); 371 void slotFeedsFilter(); 372 void slotNewsFilter(); 373 void slotGetFeedsTimer(); 374 void slotShowUpdateAppDlg(); 375 void showContextMenuToolBar(const QPoint &pos); 376 void showFeedPropertiesDlg(); 377 void slotFeedMenuShow(); 378 void slotRefreshNewsView(int nextUnread = -1); 379 void slotIconFeedPreparing(QString feedUrl, QByteArray byteArray, QString format); 380 void slotIconFeedUpdate(int feedId, QByteArray faviconData); 381 void showNewsFiltersDlg(bool newFilter = false); 382 void showFilterRulesDlg(); 383 void slotUpdateAppCheck(); 384 void slotNewVersion(const QString &newVersion); 385 void slotFeedUpPressed(); 386 void slotFeedDownPressed(); 387 void slotFeedHomePressed(); 388 void slotFeedEndPressed(); 389 void slotFeedPageUpPressed(); 390 void slotFeedPageDownPressed(); 391 void slotFeedPrevious(); 392 void slotFeedNext(); 393 void setStyleApp(QAction*); 394 void slotSwitchFocus(); 395 void slotSwitchPrevFocus(); 396 void slotOpenFeedNewTab(); 397 void slotOpenCategoryNewTab(); 398 void slotTabCurrentChanged(int index); 399 void slotTabMoved(int fromIndex, int toIndex); 400 void feedsColumnVisible(QAction *action); 401 void setNewsLayout(QAction *action); 402 void setNewsLayout(); 403 void setBrowserPosition(QAction *action); 404 void slotOpenNewsWebView(); 405 406 void slotNewsUpPressed(); 407 void slotNewsDownPressed(); 408 void slotNewsPageUpPressed(); 409 void slotNewsPageDownPressed(); 410 void markNewsRead(); 411 void markAllNewsRead(); 412 void markNewsStar(); 413 void deleteNews(); 414 void deleteAllNewsList(); 415 void restoreNews(); 416 void openInBrowserNews(); 417 void openInExternalBrowserNews(); 418 void slotOpenNewsNewTab(); 419 void slotOpenNewsBackgroundTab(); 420 void slotCopyLinkNews(); 421 void slotShowLabelsMenu(); 422 void slotPageUpWebView(); 423 void slotPageDownWebView(); 424 void setCurrentTab(int index, bool updateCurrentTab = false); 425 void findText(); 426 427 void showNotification(bool bShowRecentNews=false); 428 void deleteNotification(); 429 void clearNotification(bool bClearRecentNews=false); 430 void slotOpenNew(int feedId, int newsId); 431 void slotOpenNewBrowser(const QUrl &url); 432 void slotMarkReadNewsInNotification(int feedId, int newsId, int read); 433 void slotDeleteNewsInNotification(int feedId, int newsId); 434 void slotMarkAllReadNewsInNotification(); 435 436 void slotFindFeeds(QString); 437 void slotSelectFind(); 438 void findFeedVisible(bool visible); 439 440 void browserZoom(QAction*); 441 void slotReportProblem(); 442 443 void slotSavePageAs(); 444 void slotSavePageAsDescript(); 445 446 void setFullScreen(); 447 void setStayOnTop(); 448 void showMenuBar(); 449 450 void slotMoveIndex(const QModelIndex &indexWhere, int how); 451 452 void slotRefreshInfoTray(int newCount, int unreadCount); 453 454 void slotCategoriesClicked(QTreeWidgetItem *item, int, bool createTab = false); 455 void clearDeleted(); 456 void slotMarkReadCategory(QTreeWidgetItem *item); 457 void showNewsCategoriesTree(); 458 void feedsSplitterMoved(int pos, int); 459 460 void setLabelNews(QAction *action); 461 void setDefaultLabelNews(); 462 void getLabelNews(); 463 464 void setTextTitle(const QString &text, NewsTabWidget *widget); 465 466 void lockMainToolbar(bool lock); 467 void hideMainToolbar(); 468 469 void reduceNewsList(); 470 void increaseNewsList(); 471 472 void restoreLastNews(); 473 474 void nextUnreadNews(); 475 void prevUnreadNews(); 476 477 void slotIndentationFeedsTree(); 478 479 void customizeMainToolbar(); 480 void showCustomizeToolbarDlg(QAction *action); 481 482 void slotShareNews(QAction *action); 483 void showMenuShareNews(); 484 485 void slotOpenHomeFeed(); 486 void sortedByTitleFeedsTree(); 487 488 void showNewsMenu(); 489 void showNewsSortByMenu(); 490 void setNewsSortByColumn(); 491 492 void slotNextFolder(); 493 void slotPrevFolder(); 494 void slotExpandFolder(); 495 496 void showDownloadManager(bool activate = true); 497 void updateInfoDownloads(const QString &text); 498 499 void cleanUp(); 500 501 void showSettingPageLabels(); 502 503 void createBackup(); 504 505 private: 506 void closeEvent(QCloseEvent *event); 507 bool eventFilter(QObject *obj, QEvent *event); 508 void changeEvent(QEvent *event); 509 510 void createFeedsWidget(); 511 void createNewsTab(int index); 512 void createToolBarNull(); 513 void createActions(); 514 void createShortcut(); 515 void loadActionShortcuts(); 516 void saveActionShortcuts(); 517 void createMenu(); 518 void createToolBar(); 519 void createTrayMenu(); 520 void createStatusBar(); 521 void createTray(); 522 void createTabBarWidget(); 523 void createCentralWidget(); 524 void loadSettingsFeeds(); 525 void retranslateStrings(); 526 void recountFeedCategories(const QList<int> &categoriesList); 527 void creatFeedTab(int feedId, int feedParId); 528 void initUpdateFeeds(); 529 void addOurFeed(); 530 531 int addTab(NewsTabWidget *widget); 532 533 NewsModel *newsModel_; 534 #ifndef Q_OS_MAC 535 QMenu *mainMenu_; 536 #endif 537 ToolButton *mainMenuButton_; 538 TabBar *tabBar_; 539 QWidget *tabBarWidget_; 540 QSplitter *mainSplitter_; 541 QWidget *feedsPanel_; 542 QFrame *feedsWidget_; 543 QWidget *centralWidget_; 544 545 QList<QAction *> listActions_; 546 QStringList listDefaultShortcut_; 547 548 QAction *addAct_; 549 QAction *addFeedAct_; 550 QAction *addFeedTrayAct_; 551 QAction *addFolderAct_; 552 QAction *deleteFeedAct_; 553 QAction *importFeedsAct_; 554 QAction *exportFeedsAct_; 555 QAction *mainToolbarToggle_; 556 QAction *feedsToolbarToggle_; 557 QAction *toolBarLockAct_; 558 QAction *toolBarHideAct_; 559 QAction *customizeMainToolbarAct_; 560 QAction *customizeMainToolbarAct2_; 561 QAction *customizeFeedsToolbarAct_; 562 QAction *customizeNewsToolbarAct_; 563 QAction *classicLayoutAct_; 564 QAction *newspaperLayoutAct_; 565 QAction *layoutToggle_; 566 QAction *systemStyle_; 567 QAction *system2Style_; 568 QAction *darkStyle_; 569 QAction *greenStyle_; 570 QAction *orangeStyle_; 571 QAction *purpleStyle_; 572 QAction *pinkStyle_; 573 QAction *grayStyle_; 574 QAction *topBrowserPositionAct_; 575 QAction *bottomBrowserPositionAct_; 576 QAction *rightBrowserPositionAct_; 577 QAction *leftBrowserPositionAct_; 578 QAction *showCleanUpWizardAct_; 579 QAction *showDownloadManagerAct_; 580 QAction *setNewsFiltersAct_; 581 QAction *setFilterNewsAct_; 582 QAction *optionsAct_; 583 QAction *updateAllFeedsAct_; 584 QAction *stopUpdateAct_; 585 QAction *markAllFeedsRead_; 586 QAction *indentationFeedsTreeAct_; 587 QAction *sortedByTitleFeedsTreeAct_; 588 QAction *collapseAllFoldersAct_; 589 QAction *expandAllFoldersAct_; 590 QAction *exitAct_; 591 QAction *feedsFilter_; 592 QAction *filterFeedsAll_; 593 QAction *filterFeedsNew_; 594 QAction *filterFeedsUnread_; 595 QAction *filterFeedsStarred_; 596 QAction *filterFeedsError_; 597 598 QAction *filterNewsAll_; 599 QAction *filterNewsNew_; 600 QAction *filterNewsUnread_; 601 QAction *filterNewsStar_; 602 QAction *filterNewsNotStarred_; 603 QAction *filterNewsUnreadStar_; 604 QAction *filterNewsLastDay_; 605 QAction *filterNewsLastWeek_; 606 QAction *aboutAct_; 607 QAction *updateAppAct_; 608 QAction *reportProblemAct_; 609 610 QAction *markFeedRead_; 611 QAction *feedProperties_; 612 QAction *showWindowAct_; 613 QAction *feedKeyUpAct_; 614 QAction *feedKeyDownAct_; 615 QAction *switchFocusAct_; 616 QAction *switchFocusPrevAct_; 617 QAction *feedsWidgetVisibleAct_; 618 QAction *openFeedNewTabAct_; 619 QAction *placeToTrayAct_; 620 621 QAction *zoomInAct_; 622 QAction *zoomOutAct_; 623 QAction *zoomTo100Act_; 624 625 QActionGroup *customizeToolbarGroup_; 626 QActionGroup *layoutGroup_; 627 QActionGroup *styleGroup_; 628 QActionGroup *browserPositionGroup_; 629 QActionGroup *feedsFilterGroup_; 630 QActionGroup *browserZoomGroup_; 631 QActionGroup *newsSortByColumnGroup_; 632 QActionGroup *newsSortOrderGroup_; 633 634 QAction *feedsFilterAction_; //!< Filter name storage, needed to enable last used filter 635 QAction *newsFilterAction_; //!< Filter name storege, needed to enable last used filter 636 QString mainNewsFilter_; 637 638 QAction *showUnreadCount_; 639 QAction *showUndeleteCount_; 640 QAction *showLastUpdated_; 641 QActionGroup *feedsColumnsGroup_; 642 643 QAction *findFeedAct_; 644 QAction *fullScreenAct_; 645 QAction *stayOnTopAct_; 646 647 QAction *nextTabAct_; 648 QAction *prevTabAct_; 649 650 QAction *reduceNewsListAct_; 651 QAction *increaseNewsListAct_; 652 653 QAction *createBackupAct_; 654 QAction *showMenuBarAct_; 655 656 QMenu *fileMenu_; 657 QMenu *newMenu_; 658 QMenu *viewMenu_; 659 QMenu *toolbarsMenu_; 660 QMenu *customizeToolbarMenu_; 661 QMenu *layoutMenu_; 662 QMenu *styleMenu_; 663 QMenu *browserPositionMenu_; 664 QMenu *feedMenu_; 665 QMenu *newsMenu_; 666 QMenu *browserMenu_; 667 QMenu *toolsMenu_; 668 QMenu *helpMenu_; 669 QMenu *trayMenu_; 670 QMenu *newsContextMenu_; 671 QMenu *feedsFilterMenu_; 672 QMenu *newsFilterMenu_; 673 QMenu *feedsColumnsMenu_; 674 QMenu *browserZoomMenu_; 675 676 QToolBar *mainToolbar_; 677 QToolBar *feedsToolBar_; 678 679 NewsView *newsView_; 680 681 QProgressBar *progressBar_; 682 QLabel *statusUnread_; 683 QLabel *statusAll_; 684 685 QPushButton *pushButtonNull_; 686 687 QTimer *updateFeedsTimer_; 688 int updateIntervalSec_; 689 int updateTimeCount_; 690 bool updateFeedsEnable_; 691 int updateFeedsInterval_; 692 int updateFeedsIntervalType_; 693 QList<int> feedIdList_; 694 QMap<int,int> updateFeedsIntervalSec_; 695 QMap<int,int> updateFeedsTimeCount_; 696 697 bool minimizingTray_; 698 bool closingTray_; 699 bool singleClickTray_; 700 bool clearStatusNew_; 701 bool emptyWorking_; 702 int behaviorIconTray_; 703 704 int openingFeedAction_; 705 bool openNewsWebViewOn_; 706 707 #ifdef HAVE_QT5 708 QMediaPlayer *mediaPlayer_; 709 QMediaPlaylist *playlist_; 710 #else 711 #ifdef HAVE_PHONON 712 Phonon::MediaObject *mediaPlayer_; 713 Phonon::AudioOutput *audioOutput_; 714 #endif 715 #endif 716 717 bool soundNewNews_; 718 QString soundNotifyPath_; 719 bool playSoundNewNews_; 720 bool showNotifyOn_; 721 bool fullscreenModeNotify_; 722 bool showNotifyInactiveApp_; 723 bool onlySelectedFeeds_; 724 725 UpdateAppDialog *updateAppDialog_; 726 727 bool cleanupOnShutdown_; 728 int maxDayCleanUp_; 729 int maxNewsCleanUp_; 730 bool dayCleanUpOn_; 731 bool newsCleanUpOn_; 732 bool readCleanUp_; 733 bool neverUnreadCleanUp_; 734 bool neverStarCleanUp_; 735 bool neverLabelCleanUp_; 736 bool cleanUpDeleted_; 737 bool optimizeDB_; 738 739 struct NewNewsData 740 { 741 QList<int> idFeedList_; 742 QList<int> cntNewsList_; 743 }; 744 745 NewNewsData newNews; 746 NewNewsData recentNews; 747 748 QList<int> idColorList_; 749 QStringList colorList_; 750 751 QTimer timerTrayOpenNotify; 752 753 bool reopenFeedStartup_; 754 bool openNewTabNextToActive_; 755 756 bool updateCurrentTab_; 757 758 NotificationWidget *notificationWidget; 759 760 FindFeed *findFeeds_; 761 QWidget *findFeedsWidget_; 762 763 int feedIdOld_; 764 765 int openingLinkTimeout_; //!< During this time we'll trying swithing back to apllication 766 QTimer timerLinkOpening_; 767 768 QWidget *categoriesPanel_; 769 QLabel *categoriesLabel_; 770 ToolButton *showCategoriesButton_; 771 QWidget *categoriesWidget_; 772 QSplitter *feedsSplitter_; 773 QByteArray feedsWidgetSplitterState_; 774 775 qint64 activationStateChangedTime_; 776 777 bool isStartImportFeed_; 778 779 bool changeBehaviorActionNUN_; 780 781 bool recountCategoryCountsOn_; 782 783 OptionsDialog *optionsDialog_; 784 785 AdBlockIcon* adblockIcon_; 786 787 }; 788 789 #endif // MAINWINDOW_H 790 791