Merge branch 'master' of https://github.com/calamares/calamares into development
This commit is contained in:
commit
3fb500344c
@ -116,7 +116,7 @@ set( _tx_bad be eo fa fr_CH gu kk kn lo mk ne_NP ur uz )
|
|||||||
### Required versions
|
### Required versions
|
||||||
#
|
#
|
||||||
# See DEPENDENCIES section below.
|
# See DEPENDENCIES section below.
|
||||||
set( QT_VERSION 5.10.0 )
|
set( QT_VERSION 5.9.0 )
|
||||||
set( YAMLCPP_VERSION 0.5.1 )
|
set( YAMLCPP_VERSION 0.5.1 )
|
||||||
set( ECM_VERSION 5.18 )
|
set( ECM_VERSION 5.18 )
|
||||||
set( PYTHONLIBS_VERSION 3.3 )
|
set( PYTHONLIBS_VERSION 3.3 )
|
||||||
|
@ -3,15 +3,6 @@ include( CalamaresAddModuleSubdirectory )
|
|||||||
include( CalamaresAddLibrary )
|
include( CalamaresAddLibrary )
|
||||||
include( CalamaresAddBrandingSubdirectory )
|
include( CalamaresAddBrandingSubdirectory )
|
||||||
|
|
||||||
include_directories(
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/libcalamares
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/libcalamaresui
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/libcalamares
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/libcalamaresui
|
|
||||||
)
|
|
||||||
|
|
||||||
# library
|
# library
|
||||||
add_subdirectory( libcalamares )
|
add_subdirectory( libcalamares )
|
||||||
|
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
#ifndef CALAMARESAPPLICATION_H
|
#ifndef CALAMARESAPPLICATION_H
|
||||||
#define CALAMARESAPPLICATION_H
|
#define CALAMARESAPPLICATION_H
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
class CalamaresWindow;
|
class CalamaresWindow;
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
# libcalamares is the non-GUI part of Calamares, which includes handling
|
||||||
|
# translations, configurations, logging, utilities, global storage, and (non-GUI) jobs.
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
${QT_DEFINITIONS}
|
${QT_DEFINITIONS}
|
||||||
-DQT_SHARED
|
-DQT_SHARED
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
#include "Job.h"
|
#include "Job.h"
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
|
@ -20,9 +20,10 @@
|
|||||||
#define CALAMARES_JOB_H
|
#define CALAMARES_JOB_H
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QSharedPointer>
|
||||||
|
|
||||||
namespace Calamares {
|
namespace Calamares {
|
||||||
|
|
||||||
@ -97,6 +98,9 @@ private:
|
|||||||
bool m_emergency = false;
|
bool m_emergency = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
using job_ptr = QSharedPointer< Job >;
|
||||||
|
using JobList = QList< job_ptr >;
|
||||||
|
|
||||||
} // namespace Calamares
|
} // namespace Calamares
|
||||||
|
|
||||||
#endif // CALAMARES_JOB_H
|
#endif // CALAMARES_JOB_H
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#define CALAMARES_JOBQUEUE_H
|
#define CALAMARES_JOBQUEUE_H
|
||||||
|
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Typedefs.h"
|
#include "Job.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
|
|
||||||
// #include "utils/CalamaresUtils.h"
|
|
||||||
#include "utils/Dirs.h"
|
#include "utils/Dirs.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/Yaml.h"
|
#include "utils/Yaml.h"
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#ifndef SETTINGS_H
|
#ifndef SETTINGS_H
|
||||||
#define SETTINGS_H
|
#define SETTINGS_H
|
||||||
|
|
||||||
#include "UiDllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Typedefs.h"
|
#include "modulesystem/Actions.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
|
|
||||||
class UIDLLEXPORT Settings : public QObject
|
class DLLEXPORT Settings : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@ -41,7 +41,6 @@ public:
|
|||||||
QObject* parent = nullptr );
|
QObject* parent = nullptr );
|
||||||
|
|
||||||
static Settings* instance();
|
static Settings* instance();
|
||||||
//TODO: load from YAML then emit ready
|
|
||||||
|
|
||||||
QStringList modulesSearchPaths() const;
|
QStringList modulesSearchPaths() const;
|
||||||
|
|
||||||
@ -63,9 +62,6 @@ public:
|
|||||||
*
|
*
|
||||||
* This influences user-visible strings, for instance using the
|
* This influences user-visible strings, for instance using the
|
||||||
* word "setup" instead of "install" where relevant.
|
* word "setup" instead of "install" where relevant.
|
||||||
*
|
|
||||||
* NOTE: it's a synonym for !doChroot() for now, but may become
|
|
||||||
* an independent setting.
|
|
||||||
*/
|
*/
|
||||||
bool isSetupMode() const { return m_isSetupMode; }
|
bool isSetupMode() const { return m_isSetupMode; }
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,28 +17,18 @@
|
|||||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TYPEDEFS_H
|
#ifndef MODULESYSTEM_ACTIONS_H
|
||||||
#define TYPEDEFS_H
|
#define MODULESYSTEM_ACTIONS_H
|
||||||
|
|
||||||
#include <QList>
|
|
||||||
#include <QSharedPointer>
|
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
class Job;
|
|
||||||
|
|
||||||
typedef QSharedPointer< Job > job_ptr;
|
enum class ModuleAction : char
|
||||||
using JobList = QList< job_ptr >;
|
|
||||||
|
|
||||||
enum ModuleAction : char
|
|
||||||
{
|
{
|
||||||
Show,
|
Show,
|
||||||
Exec
|
Exec
|
||||||
};
|
};
|
||||||
|
|
||||||
class ViewStep;
|
} // namespace
|
||||||
typedef QList< ViewStep* > ViewStepList;
|
|
||||||
|
|
||||||
} //ns
|
#endif
|
||||||
|
|
||||||
#endif // TYPEDEFS_H
|
|
@ -22,7 +22,6 @@
|
|||||||
#define BRANDING_H
|
#define BRANDING_H
|
||||||
|
|
||||||
#include "UiDllMacro.h"
|
#include "UiDllMacro.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include "utils/NamedSuffix.h"
|
#include "utils/NamedSuffix.h"
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
# libcalamaresui is the GUI part of Calamares, which includes handling
|
||||||
|
# view modules, view steps, widgets, and branding.
|
||||||
|
|
||||||
|
# The UI libs use the non-UI library
|
||||||
|
include_directories( ${CMAKE_SOURCE_DIR}/src/libcalamares ${CMAKE_BINARY_DIR}/src/libcalamares )
|
||||||
|
|
||||||
set( calamaresui_SOURCES
|
set( calamaresui_SOURCES
|
||||||
modulesystem/CppJobModule.cpp
|
modulesystem/CppJobModule.cpp
|
||||||
modulesystem/Module.cpp
|
modulesystem/Module.cpp
|
||||||
|
@ -21,19 +21,14 @@
|
|||||||
#define VIEWMANAGER_H
|
#define VIEWMANAGER_H
|
||||||
|
|
||||||
#include "UiDllMacro.h"
|
#include "UiDllMacro.h"
|
||||||
#include "Typedefs.h"
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
|
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
|
|
||||||
class ViewStep;
|
|
||||||
class ExecutionViewStep;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The ViewManager class handles progression through view pages.
|
* @brief The ViewManager class handles progression through view pages.
|
||||||
* @note Singleton object, only use through ViewManager::instance().
|
* @note Singleton object, only use through ViewManager::instance().
|
||||||
|
@ -33,14 +33,14 @@ namespace Calamares
|
|||||||
Module::Type
|
Module::Type
|
||||||
CppJobModule::type() const
|
CppJobModule::type() const
|
||||||
{
|
{
|
||||||
return Job;
|
return Module::Type::Job;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Module::Interface
|
Module::Interface
|
||||||
CppJobModule::interface() const
|
CppJobModule::interface() const
|
||||||
{
|
{
|
||||||
return QtPluginInterface;
|
return Module::Interface::QtPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -235,9 +235,9 @@ Module::typeString() const
|
|||||||
{
|
{
|
||||||
switch ( type() )
|
switch ( type() )
|
||||||
{
|
{
|
||||||
case Job:
|
case Type::Job:
|
||||||
return "Job Module";
|
return "Job Module";
|
||||||
case View:
|
case Type::View:
|
||||||
return "View Module";
|
return "View Module";
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
@ -249,13 +249,13 @@ Module::interfaceString() const
|
|||||||
{
|
{
|
||||||
switch ( interface() )
|
switch ( interface() )
|
||||||
{
|
{
|
||||||
case ProcessInterface:
|
case Interface::Process:
|
||||||
return "External process";
|
return "External process";
|
||||||
case PythonInterface:
|
case Interface::Python:
|
||||||
return "Python (Boost.Python)";
|
return "Python (Boost.Python)";
|
||||||
case PythonQtInterface:
|
case Interface::PythonQt:
|
||||||
return "Python (experimental)";
|
return "Python (experimental)";
|
||||||
case QtPluginInterface:
|
case Interface::QtPlugin:
|
||||||
return "Qt Plugin";
|
return "Qt Plugin";
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
|
@ -20,11 +20,10 @@
|
|||||||
#ifndef CALAMARES_MODULE_H
|
#ifndef CALAMARES_MODULE_H
|
||||||
#define CALAMARES_MODULE_H
|
#define CALAMARES_MODULE_H
|
||||||
|
|
||||||
|
#include "Job.h"
|
||||||
#include "Requirement.h"
|
#include "Requirement.h"
|
||||||
#include "UiDllMacro.h"
|
#include "UiDllMacro.h"
|
||||||
|
|
||||||
#include <Typedefs.h>
|
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
@ -54,7 +53,7 @@ public:
|
|||||||
* A job module is a single Calamares job.
|
* A job module is a single Calamares job.
|
||||||
* A view module has a UI (one or more view pages) and zero-to-many jobs.
|
* A view module has a UI (one or more view pages) and zero-to-many jobs.
|
||||||
*/
|
*/
|
||||||
enum Type
|
enum class Type
|
||||||
{
|
{
|
||||||
Job,
|
Job,
|
||||||
View
|
View
|
||||||
@ -65,12 +64,12 @@ public:
|
|||||||
* talks to Calamares.
|
* talks to Calamares.
|
||||||
* Not all Type-Interface associations are valid.
|
* Not all Type-Interface associations are valid.
|
||||||
*/
|
*/
|
||||||
enum Interface
|
enum class Interface
|
||||||
{
|
{
|
||||||
QtPluginInterface,
|
QtPlugin, // Jobs or Views
|
||||||
PythonInterface,
|
Python, // Jobs only
|
||||||
ProcessInterface,
|
Process, // Deprecated interface
|
||||||
PythonQtInterface
|
PythonQt // Views only, available as enum even if PythonQt isn't used
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -277,7 +277,7 @@ ModuleManager::loadModules()
|
|||||||
|
|
||||||
// At this point we most certainly have a pointer to a loaded module in
|
// At this point we most certainly have a pointer to a loaded module in
|
||||||
// thisModule. We now need to enqueue jobs info into an EVS.
|
// thisModule. We now need to enqueue jobs info into an EVS.
|
||||||
if ( currentAction == Calamares::Exec )
|
if ( currentAction == ModuleAction::Exec )
|
||||||
{
|
{
|
||||||
ExecutionViewStep* evs =
|
ExecutionViewStep* evs =
|
||||||
qobject_cast< ExecutionViewStep* >(
|
qobject_cast< ExecutionViewStep* >(
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#define MODULELOADER_H
|
#define MODULELOADER_H
|
||||||
|
|
||||||
#include "Requirement.h"
|
#include "Requirement.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
@ -29,14 +29,14 @@ namespace Calamares
|
|||||||
Module::Type
|
Module::Type
|
||||||
ProcessJobModule::type() const
|
ProcessJobModule::type() const
|
||||||
{
|
{
|
||||||
return Job;
|
return Module::Type::Job;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Module::Interface
|
Module::Interface
|
||||||
ProcessJobModule::interface() const
|
ProcessJobModule::interface() const
|
||||||
{
|
{
|
||||||
return ProcessInterface;
|
return Module::Interface::Process;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,14 +30,14 @@ namespace Calamares
|
|||||||
Module::Type
|
Module::Type
|
||||||
PythonJobModule::type() const
|
PythonJobModule::type() const
|
||||||
{
|
{
|
||||||
return Job;
|
return Module::Type::Job;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Module::Interface
|
Module::Interface
|
||||||
PythonJobModule::interface() const
|
PythonJobModule::interface() const
|
||||||
{
|
{
|
||||||
return PythonInterface;
|
return Module::Interface::Python;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,14 +46,14 @@ namespace Calamares
|
|||||||
Module::Type
|
Module::Type
|
||||||
PythonQtViewModule::type() const
|
PythonQtViewModule::type() const
|
||||||
{
|
{
|
||||||
return View;
|
return Module::Type::View;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Module::Interface
|
Module::Interface
|
||||||
PythonQtViewModule::interface() const
|
PythonQtViewModule::interface() const
|
||||||
{
|
{
|
||||||
return PythonQtInterface;
|
return Module::Interface::PythonQt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,14 +34,14 @@ namespace Calamares
|
|||||||
Module::Type
|
Module::Type
|
||||||
ViewModule::type() const
|
ViewModule::type() const
|
||||||
{
|
{
|
||||||
return View;
|
return Module::Type::View;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Module::Interface
|
Module::Interface
|
||||||
ViewModule::interface() const
|
ViewModule::interface() const
|
||||||
{
|
{
|
||||||
return QtPluginInterface;
|
return Module::Interface::QtPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -65,9 +65,6 @@ ViewModule::loadSelf()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: allow internal view steps to be created here; they would
|
|
||||||
// have to be linked into the main application somehow.
|
|
||||||
|
|
||||||
// If any method created the view step, use it now.
|
// If any method created the view step, use it now.
|
||||||
if ( m_viewStep )
|
if ( m_viewStep )
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -17,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "DebugWindow.h"
|
#include "DebugWindow.h"
|
||||||
|
#include "ui_DebugWindow.h"
|
||||||
|
|
||||||
#include "utils/Retranslator.h"
|
#include "utils/Retranslator.h"
|
||||||
#include "utils/qjsonmodel.h"
|
#include "utils/qjsonmodel.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
@ -51,26 +54,27 @@ namespace Calamares {
|
|||||||
|
|
||||||
DebugWindow::DebugWindow()
|
DebugWindow::DebugWindow()
|
||||||
: QWidget( nullptr )
|
: QWidget( nullptr )
|
||||||
|
, m_ui( new Ui::DebugWindow )
|
||||||
{
|
{
|
||||||
setupUi( this );
|
m_ui->setupUi( this );
|
||||||
|
|
||||||
// GlobalStorage page
|
// GlobalStorage page
|
||||||
QJsonModel* jsonModel = new QJsonModel( this );
|
QJsonModel* jsonModel = new QJsonModel( this );
|
||||||
|
|
||||||
globalStorageView->setModel( jsonModel );
|
m_ui->globalStorageView->setModel( jsonModel );
|
||||||
GlobalStorage* gs = JobQueue::instance()->globalStorage();
|
GlobalStorage* gs = JobQueue::instance()->globalStorage();
|
||||||
|
|
||||||
connect( gs, &GlobalStorage::changed,
|
connect( gs, &GlobalStorage::changed,
|
||||||
this, [ = ]
|
this, [ = ]
|
||||||
{
|
{
|
||||||
jsonModel->loadJson( QJsonDocument::fromVariant( gs->m ).toJson() );
|
jsonModel->loadJson( QJsonDocument::fromVariant( gs->m ).toJson() );
|
||||||
globalStorageView->expandAll();
|
m_ui->globalStorageView->expandAll();
|
||||||
} );
|
} );
|
||||||
jsonModel->loadJson( QJsonDocument::fromVariant( gs->m ).toJson() );
|
jsonModel->loadJson( QJsonDocument::fromVariant( gs->m ).toJson() );
|
||||||
globalStorageView->expandAll();
|
m_ui->globalStorageView->expandAll();
|
||||||
|
|
||||||
// JobQueue page
|
// JobQueue page
|
||||||
jobQueueText->setReadOnly( true );
|
m_ui->jobQueueText->setReadOnly( true );
|
||||||
connect( JobQueue::instance(), &JobQueue::queueChanged,
|
connect( JobQueue::instance(), &JobQueue::queueChanged,
|
||||||
this, [ this ]( const JobList& jobs )
|
this, [ this ]( const JobList& jobs )
|
||||||
{
|
{
|
||||||
@ -80,30 +84,30 @@ DebugWindow::DebugWindow()
|
|||||||
text.append( job->prettyName() );
|
text.append( job->prettyName() );
|
||||||
}
|
}
|
||||||
|
|
||||||
jobQueueText->setText( text.join( '\n' ) );
|
m_ui->jobQueueText->setText( text.join( '\n' ) );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// Modules page
|
// Modules page
|
||||||
QStringListModel* modulesModel = new QStringListModel( ModuleManager::instance()->loadedInstanceKeys() );
|
QStringListModel* modulesModel = new QStringListModel( ModuleManager::instance()->loadedInstanceKeys() );
|
||||||
modulesListView->setModel( modulesModel );
|
m_ui->modulesListView->setModel( modulesModel );
|
||||||
modulesListView->setSelectionMode( QAbstractItemView::SingleSelection );
|
m_ui->modulesListView->setSelectionMode( QAbstractItemView::SingleSelection );
|
||||||
|
|
||||||
QJsonModel* moduleConfigModel = new QJsonModel( this );
|
QJsonModel* moduleConfigModel = new QJsonModel( this );
|
||||||
moduleConfigView->setModel( moduleConfigModel );
|
m_ui->moduleConfigView->setModel( moduleConfigModel );
|
||||||
|
|
||||||
#ifdef WITH_PYTHONQT
|
#ifdef WITH_PYTHONQT
|
||||||
QPushButton* pythonConsoleButton = new QPushButton;
|
QPushButton* pythonConsoleButton = new QPushButton;
|
||||||
pythonConsoleButton->setText( "Attach Python console" );
|
pythonConsoleButton->setText( "Attach Python console" );
|
||||||
modulesVerticalLayout->insertWidget( 1, pythonConsoleButton );
|
m_ui->modulesVerticalLayout->insertWidget( 1, pythonConsoleButton );
|
||||||
pythonConsoleButton->hide();
|
pythonConsoleButton->hide();
|
||||||
|
|
||||||
QObject::connect( pythonConsoleButton, &QPushButton::clicked,
|
QObject::connect( pythonConsoleButton, &QPushButton::clicked,
|
||||||
this, [ this, moduleConfigModel ]
|
this, [ this, moduleConfigModel ]
|
||||||
{
|
{
|
||||||
QString moduleName = modulesListView->currentIndex().data().toString();
|
QString moduleName = m_ui->modulesListView->currentIndex().data().toString();
|
||||||
Module* module = ModuleManager::instance()->moduleInstance( moduleName );
|
Module* module = ModuleManager::instance()->moduleInstance( moduleName );
|
||||||
if ( module->interface() != Module::PythonQtInterface ||
|
if ( module->interface() != Module::Interface::PythonQt ||
|
||||||
module->type() != Module::View )
|
module->type() != Module::Type::View )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for ( ViewStep* step : ViewManager::instance()->viewSteps() )
|
for ( ViewStep* step : ViewManager::instance()->viewSteps() )
|
||||||
@ -159,33 +163,33 @@ DebugWindow::DebugWindow()
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
connect( modulesListView->selectionModel(), &QItemSelectionModel::selectionChanged,
|
connect( m_ui->modulesListView->selectionModel(), &QItemSelectionModel::selectionChanged,
|
||||||
this, [ this, moduleConfigModel
|
this, [ this, moduleConfigModel
|
||||||
#ifdef WITH_PYTHONQT
|
#ifdef WITH_PYTHONQT
|
||||||
, pythonConsoleButton
|
, pythonConsoleButton
|
||||||
#endif
|
#endif
|
||||||
]
|
]
|
||||||
{
|
{
|
||||||
QString moduleName = modulesListView->currentIndex().data().toString();
|
QString moduleName = m_ui->modulesListView->currentIndex().data().toString();
|
||||||
Module* module = ModuleManager::instance()->moduleInstance( moduleName );
|
Module* module = ModuleManager::instance()->moduleInstance( moduleName );
|
||||||
if ( module )
|
if ( module )
|
||||||
{
|
{
|
||||||
moduleConfigModel->loadJson( QJsonDocument::fromVariant( module->configurationMap() ).toJson() );
|
moduleConfigModel->loadJson( QJsonDocument::fromVariant( module->configurationMap() ).toJson() );
|
||||||
moduleConfigView->expandAll();
|
m_ui->moduleConfigView->expandAll();
|
||||||
moduleTypeLabel->setText( module->typeString() );
|
m_ui->moduleTypeLabel->setText( module->typeString() );
|
||||||
moduleInterfaceLabel->setText( module->interfaceString() );
|
m_ui->moduleInterfaceLabel->setText( module->interfaceString() );
|
||||||
#ifdef WITH_PYTHONQT
|
#ifdef WITH_PYTHONQT
|
||||||
pythonConsoleButton->setVisible(
|
pythonConsoleButton->setVisible(
|
||||||
module->interface() == Module::PythonQtInterface &&
|
module->interface() == Module::Interface::PythonQt &&
|
||||||
module->type() == Module::View );
|
module->type() == Module::Type::View );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
connect( crashButton, &QPushButton::clicked, this, [] { ::crash(); } );
|
connect( m_ui->crashButton, &QPushButton::clicked, this, [] { ::crash(); } );
|
||||||
|
|
||||||
CALAMARES_RETRANSLATE(
|
CALAMARES_RETRANSLATE(
|
||||||
retranslateUi( this );
|
m_ui->retranslateUi( this );
|
||||||
setWindowTitle( tr( "Debug information" ) );
|
setWindowTitle( tr( "Debug information" ) );
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2019, Adriaan de Groot <groot@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -19,13 +20,18 @@
|
|||||||
#ifndef CALAMARES_DEBUGWINDOW_H
|
#ifndef CALAMARES_DEBUGWINDOW_H
|
||||||
#define CALAMARES_DEBUGWINDOW_H
|
#define CALAMARES_DEBUGWINDOW_H
|
||||||
|
|
||||||
#include "ui_DebugWindow.h"
|
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
|
||||||
namespace Calamares {
|
namespace Calamares {
|
||||||
|
|
||||||
class DebugWindow : public QWidget, private Ui::DebugWindow
|
// From the .ui file
|
||||||
|
namespace Ui
|
||||||
|
{
|
||||||
|
class DebugWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DebugWindow : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -38,8 +44,10 @@ signals:
|
|||||||
protected:
|
protected:
|
||||||
void closeEvent( QCloseEvent* e ) override;
|
void closeEvent( QCloseEvent* e ) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::DebugWindow *m_ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // namespace Calamares
|
} // namespace
|
||||||
#endif // CALAMARES_DEBUGWINDOW_H
|
#endif
|
||||||
|
@ -20,10 +20,11 @@
|
|||||||
#ifndef VIEWSTEP_H
|
#ifndef VIEWSTEP_H
|
||||||
#define VIEWSTEP_H
|
#define VIEWSTEP_H
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
|
|
||||||
#include "Typedefs.h"
|
#include "Job.h"
|
||||||
#include "UiDllMacro.h"
|
#include "UiDllMacro.h"
|
||||||
|
|
||||||
#include "modulesystem/Requirement.h"
|
#include "modulesystem/Requirement.h"
|
||||||
@ -159,6 +160,7 @@ protected:
|
|||||||
QString m_instanceKey;
|
QString m_instanceKey;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
using ViewStepList = QList< ViewStep* >;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // VIEWSTEP_H
|
#endif // VIEWSTEP_H
|
||||||
|
@ -4,6 +4,12 @@
|
|||||||
# in this list.
|
# in this list.
|
||||||
set( LIST_SKIPPED_MODULES "" )
|
set( LIST_SKIPPED_MODULES "" )
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
${CMAKE_SOURCE_DIR}/src/libcalamares
|
||||||
|
${CMAKE_BINARY_DIR}/src/libcalamares
|
||||||
|
${CMAKE_SOURCE_DIR}/src/libcalamaresui
|
||||||
|
)
|
||||||
|
|
||||||
if( BUILD_TESTING )
|
if( BUILD_TESTING )
|
||||||
add_executable( test_conf test_conf.cpp )
|
add_executable( test_conf test_conf.cpp )
|
||||||
target_link_libraries( test_conf ${YAMLCPP_LIBRARY} Qt5::Core )
|
target_link_libraries( test_conf ${YAMLCPP_LIBRARY} Qt5::Core )
|
||||||
|
@ -6,8 +6,7 @@ if ( KPMcore_FOUND )
|
|||||||
find_package( Qt5 REQUIRED DBus ) # Needed for KPMCore
|
find_package( Qt5 REQUIRED DBus ) # Needed for KPMCore
|
||||||
find_package( KF5 REQUIRED I18n WidgetsAddons ) # Needed for KPMCore
|
find_package( KF5 REQUIRED I18n WidgetsAddons ) # Needed for KPMCore
|
||||||
|
|
||||||
include_directories( ${KPMCORE_INCLUDE_DIR} )
|
include_directories( ${KPMCORE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/src/modules/partition )
|
||||||
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamares )
|
|
||||||
|
|
||||||
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
|
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
|
||||||
list( APPEND _partition_defs WITH_KPMCORE331API) # kpmcore > 3.3.0 with deprecations
|
list( APPEND _partition_defs WITH_KPMCORE331API) # kpmcore > 3.3.0 with deprecations
|
||||||
|
@ -37,7 +37,8 @@
|
|||||||
#include "utils/Units.h"
|
#include "utils/Units.h"
|
||||||
#include "utils/Variant.h"
|
#include "utils/Variant.h"
|
||||||
|
|
||||||
#include "modules/partition/core/PartitionIterator.h"
|
// From partition module
|
||||||
|
#include "core/PartitionIterator.h"
|
||||||
|
|
||||||
|
|
||||||
static const NamedEnumTable<ResizeFSJob::RelativeUnit>&
|
static const NamedEnumTable<ResizeFSJob::RelativeUnit>&
|
||||||
|
@ -24,13 +24,11 @@
|
|||||||
#ifndef KEYBOARDPAGE_H
|
#ifndef KEYBOARDPAGE_H
|
||||||
#define KEYBOARDPAGE_H
|
#define KEYBOARDPAGE_H
|
||||||
|
|
||||||
#include "keyboardwidget/keyboardglobal.h"
|
#include "Job.h"
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
#include <QWidget>
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
@ -50,7 +48,7 @@ public:
|
|||||||
|
|
||||||
QString prettyStatus() const;
|
QString prettyStatus() const;
|
||||||
|
|
||||||
QList< Calamares::job_ptr > createJobs( const QString& xOrgConfFileName,
|
Calamares::JobList createJobs( const QString& xOrgConfFileName,
|
||||||
const QString& convertedKeymapPath,
|
const QString& convertedKeymapPath,
|
||||||
bool writeEtcDefaultKeyboard );
|
bool writeEtcDefaultKeyboard );
|
||||||
|
|
||||||
|
@ -20,9 +20,8 @@
|
|||||||
#ifndef LOCALEPAGE_H
|
#ifndef LOCALEPAGE_H
|
||||||
#define LOCALEPAGE_H
|
#define LOCALEPAGE_H
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include "LocaleConfiguration.h"
|
#include "LocaleConfiguration.h"
|
||||||
|
#include "Job.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ public:
|
|||||||
|
|
||||||
QString prettyStatus() const;
|
QString prettyStatus() const;
|
||||||
|
|
||||||
QList< Calamares::job_ptr > createJobs();
|
Calamares::JobList createJobs();
|
||||||
|
|
||||||
QMap< QString, QString > localesMap();
|
QMap< QString, QString > localesMap();
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "PackageModel.h"
|
#include "PackageModel.h"
|
||||||
#include "PackageTreeItem.h"
|
#include "PackageTreeItem.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include <QAbstractButton>
|
#include <QAbstractButton>
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
#ifdef DEBUG_PARTITION_LAME
|
#ifdef DEBUG_PARTITION_LAME
|
||||||
#include "JobExample.h"
|
#include "JobExample.h"
|
||||||
#endif
|
#endif
|
||||||
#include "Typedefs.h"
|
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
// KPMcore
|
// KPMcore
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
#include "core/KPMHelpers.h"
|
#include "core/KPMHelpers.h"
|
||||||
#include "core/PartitionLayout.h"
|
#include "core/PartitionLayout.h"
|
||||||
#include "core/PartitionModel.h"
|
#include "core/PartitionModel.h"
|
||||||
#include "Typedefs.h"
|
|
||||||
|
#include "Job.h"
|
||||||
|
|
||||||
// KPMcore
|
// KPMcore
|
||||||
#include <kpmcore/core/lvmdevice.h>
|
#include <kpmcore/core/lvmdevice.h>
|
||||||
@ -172,7 +173,7 @@ public:
|
|||||||
* requested by the user.
|
* requested by the user.
|
||||||
* @return a list of jobs.
|
* @return a list of jobs.
|
||||||
*/
|
*/
|
||||||
QList< Calamares::job_ptr > jobs() const;
|
Calamares::JobList jobs() const;
|
||||||
|
|
||||||
bool hasRootMountPoint() const;
|
bool hasRootMountPoint() const;
|
||||||
|
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
|
|
||||||
#include "core/PartUtils.h"
|
#include "core/PartUtils.h"
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
// KPMcore
|
// KPMcore
|
||||||
#include <kpmcore/core/partitiontable.h>
|
#include <kpmcore/core/partitiontable.h>
|
||||||
#include <kpmcore/fs/filesystem.h>
|
#include <kpmcore/fs/filesystem.h>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef SUMMARYPAGE_H
|
#ifndef SUMMARYPAGE_H
|
||||||
#define SUMMARYPAGE_H
|
#define SUMMARYPAGE_H
|
||||||
|
|
||||||
#include "Typedefs.h"
|
#include "viewpages/ViewStep.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
@ -24,9 +24,8 @@
|
|||||||
#ifndef USERSPAGE_H
|
#ifndef USERSPAGE_H
|
||||||
#define USERSPAGE_H
|
#define USERSPAGE_H
|
||||||
|
|
||||||
#include "Typedefs.h"
|
|
||||||
|
|
||||||
#include "CheckPWQuality.h"
|
#include "CheckPWQuality.h"
|
||||||
|
#include "Job.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ public:
|
|||||||
|
|
||||||
bool isReady();
|
bool isReady();
|
||||||
|
|
||||||
QList< Calamares::job_ptr > createJobs( const QStringList& defaultGroupsList );
|
Calamares::JobList createJobs( const QStringList& defaultGroupsList );
|
||||||
|
|
||||||
void onActivate();
|
void onActivate();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user