1 /* 2 * DesktopSecondaryWindow.hpp 3 * 4 * Copyright (C) 2021 by RStudio, PBC 5 * 6 * Unless you have received this program directly from RStudio pursuant 7 * to the terms of a commercial license agreement with RStudio, then 8 * this program is licensed to you under the terms of version 3 of the 9 * GNU Affero General Public License. This program is distributed WITHOUT 10 * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, 11 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the 12 * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. 13 * 14 */ 15 16 #ifndef DESKTOP_SECONDARY_WINDOW_HPP 17 #define DESKTOP_SECONDARY_WINDOW_HPP 18 19 #include <QMainWindow> 20 #include "DesktopBrowserWindow.hpp" 21 22 namespace rstudio { 23 namespace desktop { 24 25 class SecondaryWindow : public BrowserWindow 26 { 27 Q_OBJECT 28 public: 29 explicit SecondaryWindow(bool showToolbar, QString name, QUrl baseUrl, 30 QWidget* pParent = nullptr, WebPage *pOpener = nullptr, 31 bool allowExternalNavigate = false); 32 public Q_SLOTS: 33 void onCloseWindowShortcut(); 34 35 protected Q_SLOTS: 36 void finishLoading(bool ok) override; 37 virtual void manageCommandState(); 38 39 private: 40 QAction* back_; 41 QAction* forward_; 42 QAction* reload_; 43 QAction* print_; 44 }; 45 46 } // namespace desktop 47 } // namespace rstudio 48 49 #endif // DESKTOP_SECONDARY_WINDOW_HPP 50