Skip to content
Snippets Groups Projects
Select Git revision
  • f73321d14085577c38bbebd2729d9901001766c9
  • master default protected
  • md-export
  • th/mail
  • 179-einladungen-zum-aushaengen-drucken
5 results

utils.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ChoicePage.cpp 17.62 KiB
    /* === This file is part of Calamares - <http://github.com/calamares> ===
     *
     *   Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
     *
     *   Calamares 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.
     *
     *   Calamares 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 Calamares. If not, see <http://www.gnu.org/licenses/>.
     */
    
    #include "ChoicePage.h"
    
    #include "core/PartitionCoreModule.h"
    #include "core/DeviceModel.h"
    #include "core/PartitionModel.h"
    #include "OsproberEntry.h"
    #include "core/partitiontable.h"
    #include "core/device.h"
    
    #include "PrettyRadioButton.h"
    
    #include "utils/CalamaresUtilsGui.h"
    #include "utils/Logger.h"
    #include "utils/Retranslator.h"
    #include "Branding.h"
    
    #include <QBoxLayout>
    #include <QButtonGroup>
    #include <QDir>
    #include <QLabel>
    
    ChoicePage::ChoicePage( QWidget* parent )
        : QWidget( parent )
        , m_choice( NoChoice )
        , m_nextEnabled( false )
        , m_core( nullptr )
    {
        QBoxLayout* mainLayout = new QVBoxLayout;
        setLayout( mainLayout );
    
        m_messageLabel = new QLabel;
        m_messageLabel->setWordWrap( true );
    
        m_itemsLayout = new QVBoxLayout;
        CalamaresUtils::unmarginLayout( m_itemsLayout );
    
        mainLayout->addSpacing( CalamaresUtils::defaultFontHeight() );
        mainLayout->addWidget( m_messageLabel );
        mainLayout->addLayout( m_itemsLayout );
        mainLayout->addStretch();
    }
    
    
    ChoicePage::~ChoicePage()
    {}
    
    
    void
    ChoicePage::init( PartitionCoreModule* core, const OsproberEntryList& osproberEntries )
    {
        m_core = core;