| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/gui/tabwidget.h`/ |
| 2 | |
| 3 | #ifndef TABWIDGET_H |
| 4 | #define TABWIDGET_Hcxx . . $ `src/librssguard/gui/tabwidget.h:4:9`! |
| 5 | |
| 6 | #include "core/message.h"cxx . . $ `<file>/src/librssguard/core/message.h`/ |
| 7 | #include "gui/tabbar.h"cxx . . $ `<file>/src/librssguard/gui/tabbar.h`/ |
| 8 | #include "gui/tabcontent.h"cxx . . $ `<file>/src/librssguard/gui/tabcontent.h`/ |
| 9 | |
| 10 | #include <QTabWidget> |
| 11 | #include <QUrl> |
| 12 | |
| 13 | class QMenucxx . . $ QMenu#; |
| 14 | class PlainToolButtoncxx . . $ PlainToolButton#; |
| 15 | class RootItemcxx . . $ RootItem#; |
| 16 | class FeedMessageViewercxx . . $ FeedMessageViewer#; |
| 17 | |
| 18 | class TabWidgetcxx . . $ TabWidget# : public QTabWidgetcxx . . $ QTabWidget# { |
| 19 | Q_OBJECTcxx . . $ TabWidget#qt_staticMetaObjectRelocatingContent. |
| 20 | |
| 21 | public: |
| 22 | // Constructors and destructors. |
| 23 | explicit TabWidgetcxx . . $ TabWidget#TabWidget(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent = nullptr); |
| 24 | virtual ~cxx . . $ TabWidget#`~TabWidget`(ced63f7c635d850d).TabWidgetcxx . . $ TabWidget#(); |
| 25 | |
| 26 | // Manimulators for tabs. |
| 27 | int addTabcxx . . $ TabWidget#addTab(2a860c5dea768f3).(TabContentcxx . . $ TabContent#* widget, const QStringcxx . . $ QString#&, TabBarcxx . . $ TabBar#::TabTypecxx . . $ TabBar#TabType# type = TabBarcxx . . $ TabBar#::TabTypecxx . . $ TabBar#TabType#::NonClosablecxx . . $ TabBar#TabType#NonClosable.); |
| 28 | int addTabcxx . . $ TabWidget#addTab(98196b93e08c9997).(TabContentcxx . . $ TabContent#* widget, |
| 29 | const QIconcxx . . $ QIcon#& icon, |
| 30 | const QStringcxx . . $ QString#& label, |
| 31 | TabBarcxx . . $ TabBar#::TabTypecxx . . $ TabBar#TabType# type = TabBarcxx . . $ TabBar#::TabTypecxx . . $ TabBar#TabType#::NonClosablecxx . . $ TabBar#TabType#NonClosable.); |
| 32 | int insertTabcxx . . $ TabWidget#insertTab(ddddefa9269a1c24).(int index, QWidgetcxx . . $ QWidget#* widget, const QStringcxx . . $ QString#& label, TabBarcxx . . $ TabBar#::TabTypecxx . . $ TabBar#TabType# type = TabBarcxx . . $ TabBar#::TabTypecxx . . $ TabBar#TabType#::Closablecxx . . $ TabBar#TabType#Closable.); |
| 33 | int insertTabcxx . . $ TabWidget#insertTab(cf2188b040894829).(int index, |
| 34 | QWidgetcxx . . $ QWidget#* widget, |
| 35 | const QIconcxx . . $ QIcon#& icon, |
| 36 | const QStringcxx . . $ QString#& label, |
| 37 | TabBarcxx . . $ TabBar#::TabTypecxx . . $ TabBar#TabType# type = TabBarcxx . . $ TabBar#::TabTypecxx . . $ TabBar#TabType#::NonClosablecxx . . $ TabBar#TabType#NonClosable.); |
| 38 | void removeTabcxx . . $ TabWidget#removeTab(918ebd27a9ddbad3).(int index, bool clear_from_memory); |
| 39 | |
| 40 | // Returns tab bar. |
| 41 | TabBarcxx . . $ TabBar#* tabBarcxx . . $ TabWidget#tabBar(224ee3b1e52b9cab).() const; |
| 42 | |
| 43 | // Returns the central widget of this tab. |
| 44 | TabContentcxx . . $ TabContent#* widgetcxx . . $ TabWidget#widget(afa890d2d7e954cc).(int index) const; |
| 45 | |
| 46 | TabContentcxx . . $ TabContent#* currentWidgetcxx . . $ TabWidget#currentWidget(f8d5b1fcdea8f5ed).() const; |
| 47 | |
| 48 | // Initializes TabWidget with tabs, this includes initialization |
| 49 | // of main "Feeds" widget. |
| 50 | void initializeTabscxx . . $ TabWidget#initializeTabs(49f6e7a06ebc5aa8).(); |
| 51 | |
| 52 | // Sets up icons for this TabWidget. |
| 53 | void setupIconscxx . . $ TabWidget#setupIcons(49f6e7a06ebc5aa8).(); |
| 54 | |
| 55 | // Accessor to feed/message viewer. |
| 56 | FeedMessageViewercxx . . $ FeedMessageViewer#* feedMessageViewercxx . . $ TabWidget#feedMessageViewer(f908a1dc9ca40ab9).() const; |
| 57 | |
| 58 | public slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!: |
| 59 | void scrollUpCurrentBrowsercxx . . $ TabWidget#scrollUpCurrentBrowser(49f6e7a06ebc5aa8).(); |
| 60 | void scrollDownCurrentBrowsercxx . . $ TabWidget#scrollDownCurrentBrowser(49f6e7a06ebc5aa8).(); |
| 61 | |
| 62 | // Called when number of tab pages changes. |
| 63 | void checkCornerButtonVisibilitycxx . . $ TabWidget#checkCornerButtonVisibility(49f6e7a06ebc5aa8).(); |
| 64 | void updateAppearancecxx . . $ TabWidget#updateAppearance(49f6e7a06ebc5aa8).(); |
| 65 | |
| 66 | // Tab closing. |
| 67 | bool closeTabcxx . . $ TabWidget#closeTab(83c267b20bac841a).(int index); |
| 68 | void closeTabWithSendercxx . . $ TabWidget#closeTabWithSender(49f6e7a06ebc5aa8).(); |
| 69 | void closeAllTabsExceptCurrentcxx . . $ TabWidget#closeAllTabsExceptCurrent(49f6e7a06ebc5aa8).(); |
| 70 | void closeAllTabscxx . . $ TabWidget#closeAllTabs(49f6e7a06ebc5aa8).(); |
| 71 | void closeCurrentTabcxx . . $ TabWidget#closeCurrentTab(49f6e7a06ebc5aa8).(); |
| 72 | |
| 73 | // Displays download manager. |
| 74 | void showDownloadManagercxx . . $ TabWidget#showDownloadManager(49f6e7a06ebc5aa8).(); |
| 75 | |
| 76 | int addSingleMessageViewcxx . . $ TabWidget#addSingleMessageView(ad07dea1d3482f75).(RootItemcxx . . $ RootItem#* root, const Messagecxx . . $ Message#& message); |
| 77 | |
| 78 | // Adds new WebBrowser tab to global TabWidget. |
| 79 | int addEmptyBrowsercxx . . $ TabWidget#addEmptyBrowser(b126dc7c1de90089).(); |
| 80 | |
| 81 | #if defined(ENABLE_MEDIAPLAYERcxx . . $ `<built-in>:497:9`!) |
| 82 | int addMediaPlayercxx . . $ TabWidget#addMediaPlayer(ab83eb1a40287ebc).(const QStringcxx . . $ QString#& url, bool make_active); |
| 83 | #endif |
| 84 | |
| 85 | // Adds new WebBrowser with link. This is used when user |
| 86 | // selects to "Open link in new tab.". |
| 87 | int addLinkedBrowsercxx . . $ TabWidget#addLinkedBrowser(2d9a7f822672be54).(const QUrlcxx . . $ QUrl#& initial_url = QUrlcxx . . $ QUrl#QUrl(49f6e7a06ebc5aa8).()); |
| 88 | int addLinkedBrowsercxx . . $ TabWidget#addLinkedBrowser(645d6210e0be3a78).(const QStringcxx . . $ QString#& initial_url); |
| 89 | |
| 90 | // General method for adding WebBrowsers. |
| 91 | int addBrowsercxx . . $ TabWidget#addBrowser(4e270c9c7b1d0cb).(bool move_after_current, bool make_active, const QUrlcxx . . $ QUrl#& initial_url = QUrlcxx . . $ QUrl#QUrl(49f6e7a06ebc5aa8).()); |
| 92 | int addBrowsercxx . . $ TabWidget#addBrowser(6bd1a2c6a5d7844e).(bool move_after_current, bool make_active, WebBrowsercxx . . $ WebBrowser#* browser); |
| 93 | |
| 94 | void gotoNextTabcxx . . $ TabWidget#gotoNextTab(49f6e7a06ebc5aa8).(); |
| 95 | void gotoPreviousTabcxx . . $ TabWidget#gotoPreviousTab(49f6e7a06ebc5aa8).(); |
| 96 | |
| 97 | private slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!: |
| 98 | |
| 99 | // Fixes tabs indexes. |
| 100 | void fixContentsAfterMovecxx . . $ TabWidget#fixContentsAfterMove(3e454b8ccf442868).(int from, int to); |
| 101 | |
| 102 | // Changes icon/text of the tab. |
| 103 | void changeTitlecxx . . $ TabWidget#changeTitle(4b11a7293b4ed91c).(int index, const QStringcxx . . $ QString#& new_title); |
| 104 | void changeIconcxx . . $ TabWidget#changeIcon(40a39523e9ce8b1e).(int index, const QIconcxx . . $ QIcon#& new_icon); |
| 105 | |
| 106 | // Opens main menu. |
| 107 | void openMainMenucxx . . $ TabWidget#openMainMenu(49f6e7a06ebc5aa8).(); |
| 108 | |
| 109 | private: |
| 110 | void indentTabTextcxx . . $ TabWidget#indentTabText(d4f767463ce0a6b3).(int index); |
| 111 | void createConnectionscxx . . $ TabWidget#createConnections(49f6e7a06ebc5aa8).(); |
| 112 | void setupMainMenuButtoncxx . . $ TabWidget#setupMainMenuButton(49f6e7a06ebc5aa8).(); |
| 113 | |
| 114 | void tabInsertedcxx . . $ TabWidget#tabInserted(d4f767463ce0a6b3).(int index); |
| 115 | void tabRemovedcxx . . $ TabWidget#tabRemoved(d4f767463ce0a6b3).(int index); |
| 116 | |
| 117 | PlainToolButtoncxx . . $ PlainToolButton#* m_btnMainMenucxx . . $ TabWidget#m_btnMainMenu.; |
| 118 | QMenucxx . . $ QMenu#* m_menuMaincxx . . $ TabWidget#m_menuMain.; |
| 119 | FeedMessageViewercxx . . $ FeedMessageViewer#* m_feedMessageViewercxx . . $ TabWidget#m_feedMessageViewer.; |
| 120 | }; |
| 121 | |
| 122 | inline TabBarcxx . . $ TabBar#* TabWidgetcxx . . $ TabWidget#::tabBarcxx . . $ TabWidget#tabBar(224ee3b1e52b9cab).() const { |
| 123 | return static_cast<TabBarcxx . . $ TabBar#*>(QTabWidgetcxx . . $ QTabWidget#::tabBarcxx . . $ QTabWidget#tabBar(f420c40d5965fcbe).()); |
| 124 | } |
| 125 | |
| 126 | inline TabContentcxx . . $ TabContent#* TabWidgetcxx . . $ TabWidget#::widgetcxx . . $ TabWidget#widget(afa890d2d7e954cc).(int index) const { |
| 127 | return static_cast<TabContentcxx . . $ TabContent#*>(QTabWidgetcxx . . $ QTabWidget#::widgetcxx . . $ QTabWidget#widget(6d79a97041fa24a7).(index)); |
| 128 | } |
| 129 | |
| 130 | inline TabContentcxx . . $ TabContent#* TabWidgetcxx . . $ TabWidget#::currentWidgetcxx . . $ TabWidget#currentWidget(f8d5b1fcdea8f5ed).() const { |
| 131 | return static_cast<TabContentcxx . . $ TabContent#*>(QTabWidgetcxx . . $ QTabWidget#::currentWidgetcxx . . $ QTabWidget#currentWidget(27f420ad5cce8994).()); |
| 132 | } |
| 133 | |
| 134 | inline FeedMessageViewercxx . . $ FeedMessageViewer#* TabWidgetcxx . . $ TabWidget#::feedMessageViewercxx . . $ TabWidget#feedMessageViewer(f908a1dc9ca40ab9).() const { |
| 135 | return m_feedMessageViewercxx . . $ TabWidget#m_feedMessageViewer.; |
| 136 | } |
| 137 | |
| 138 | #endif // TABWIDGET_H |