"Fossies" - the Fresh Open Source Software Archive

Member "ssr-0.4.2/src/GUI/PageDone.cpp" (18 May 2020, 2054 Bytes) of package /linux/privat/ssr-0.4.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "PageDone.cpp" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 0.4.1_vs_0.4.2.

    1 /*
    2 Copyright (c) 2012-2020 Maarten Baert <maarten-baert@hotmail.com>
    3 
    4 This file is part of SimpleScreenRecorder.
    5 
    6 SimpleScreenRecorder is free software: you can redistribute it and/or modify
    7 it under the terms of the GNU General Public License as published by
    8 the Free Software Foundation, either version 3 of the License, or
    9 (at your option) any later version.
   10 
   11 SimpleScreenRecorder is distributed in the hope that it will be useful,
   12 but WITHOUT ANY WARRANTY; without even the implied warranty of
   13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   14 GNU General Public License for more details.
   15 
   16 You should have received a copy of the GNU General Public License
   17 along with SimpleScreenRecorder.  If not, see <http://www.gnu.org/licenses/>.
   18 */
   19 
   20 #include "PageDone.h"
   21 
   22 #include "Icons.h"
   23 #include "MainWindow.h"
   24 #include "PageOutput.h"
   25 
   26 PageDone::PageDone(MainWindow* main_window)
   27     : QWidget(main_window->centralWidget()) {
   28 
   29     m_main_window = main_window;
   30 
   31     QLabel *label_done = new QLabel(tr("The recording has been saved. You can edit the video now, or re-encode it with better settings to "
   32                                        "make the file smaller (the default settings are optimized for quality and speed, not file size)."), this);
   33     label_done->setWordWrap(true);
   34 
   35     QPushButton *button_open_folder = new QPushButton(g_icon_folder_open, tr("Open folder"), this);
   36     connect(button_open_folder, SIGNAL(clicked()), this, SLOT(OnOpenFolder()));
   37 
   38     QPushButton *button_back = new QPushButton(g_icon_go_home, tr("Back to the start screen"), this);
   39     connect(button_back, SIGNAL(clicked()), m_main_window, SLOT(GoPageWelcome()));
   40 
   41     QVBoxLayout *layout = new QVBoxLayout(this);
   42     layout->addWidget(label_done);
   43     {
   44         QHBoxLayout *layout2 = new QHBoxLayout();
   45         layout->addLayout(layout2);
   46         layout2->addWidget(button_open_folder);
   47         layout2->addStretch();
   48     }
   49     layout->addStretch();
   50     layout->addWidget(button_back);
   51 
   52 }
   53 
   54 void PageDone::OnOpenFolder() {
   55     QFileInfo fi(m_main_window->GetPageOutput()->GetFile());
   56     QDesktopServices::openUrl(QUrl::fromLocalFile(fi.absolutePath()));
   57 }