Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
113e65fc
Commit
113e65fc
authored
Aug 23, 2022
by
Laurent Montel
Browse files
Code moved in pimcommon
parent
41d67408
Pipeline
#221454
passed with stage
in 12 minutes and 26 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/customtoolsplugins/translatorplugin/CMakeLists.txt
View file @
113e65fc
...
...
@@ -6,10 +6,6 @@ target_sources(pimcommon_translatorplugin PRIVATE
translatorview.cpp
translatorplugin.h
translatorview.h
translatorconfiguredialog.h
translatorconfiguredialog.cpp
translatorconfigurewidget.h
translatorconfigurewidget.cpp
)
if
(
COMPILE_WITH_UNITY_CMAKE_SUPPORT
)
...
...
plugins/customtoolsplugins/translatorplugin/translatorconfiguredialog.cpp
deleted
100644 → 0
View file @
41d67408
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include
"translatorconfiguredialog.h"
#include
"translatorconfigurewidget.h"
#include
<KLocalizedString>
#include
<QDialogButtonBox>
#include
<QVBoxLayout>
TranslatorConfigureDialog
::
TranslatorConfigureDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
)
,
mTranslatorConfigureWidget
(
new
TranslatorConfigureWidget
(
this
))
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Configure Translator"
));
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainlayout"
));
mTranslatorConfigureWidget
->
setObjectName
(
QStringLiteral
(
"mTranslatorConfigureWidget"
));
auto
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
buttonBox
->
setObjectName
(
QStringLiteral
(
"buttonBox"
));
mainLayout
->
addWidget
(
buttonBox
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
TranslatorConfigureDialog
::
accept
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
TranslatorConfigureDialog
::
reject
);
}
TranslatorConfigureDialog
::~
TranslatorConfigureDialog
()
=
default
;
plugins/customtoolsplugins/translatorplugin/translatorconfiguredialog.h
deleted
100644 → 0
View file @
41d67408
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include
<QDialog>
class
TranslatorConfigureWidget
;
class
TranslatorConfigureDialog
:
public
QDialog
{
public:
explicit
TranslatorConfigureDialog
(
QWidget
*
parent
=
nullptr
);
~
TranslatorConfigureDialog
()
override
;
private:
TranslatorConfigureWidget
*
const
mTranslatorConfigureWidget
;
};
plugins/customtoolsplugins/translatorplugin/translatorconfigurewidget.cpp
deleted
100644 → 0
View file @
41d67408
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include
"translatorconfigurewidget.h"
#include
<KLocalizedString>
#include
<QComboBox>
#include
<QLabel>
#include
<QVBoxLayout>
TranslatorConfigureWidget
::
TranslatorConfigureWidget
(
QWidget
*
parent
)
:
QWidget
{
parent
}
,
mEngine
(
new
QComboBox
(
this
))
{
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
mainLayout
->
setContentsMargins
({});
mEngine
->
setObjectName
(
QStringLiteral
(
"mEngine"
));
auto
hboxLayout
=
new
QHBoxLayout
;
hboxLayout
->
setContentsMargins
({});
mainLayout
->
addLayout
(
hboxLayout
);
auto
label
=
new
QLabel
(
i18n
(
"Engine:"
),
this
);
label
->
setObjectName
(
QStringLiteral
(
"label"
));
hboxLayout
->
addWidget
(
label
);
hboxLayout
->
addWidget
(
mEngine
);
}
TranslatorConfigureWidget
::~
TranslatorConfigureWidget
()
{
}
plugins/customtoolsplugins/translatorplugin/translatorconfigurewidget.h
deleted
100644 → 0
View file @
41d67408
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include
<QWidget>
class
QComboBox
;
class
TranslatorConfigureWidget
:
public
QWidget
{
Q_OBJECT
public:
explicit
TranslatorConfigureWidget
(
QWidget
*
parent
=
nullptr
);
~
TranslatorConfigureWidget
()
override
;
private:
QComboBox
*
const
mEngine
;
};
plugins/customtoolsplugins/translatorplugin/translatorplugin.cpp
View file @
113e65fc
...
...
@@ -5,7 +5,6 @@
*/
#include
"translatorplugin.h"
#include
"translatorconfiguredialog.h"
#include
"translatorview.h"
#include
<KLocalizedString>
#include
<KPluginFactory>
...
...
@@ -41,8 +40,7 @@ bool TranslatorPlugin::hasConfigureDialog() const
void
TranslatorPlugin
::
showConfigureDialog
(
QWidget
*
parent
)
{
TranslatorConfigureDialog
dlg
(
parent
);
dlg
.
exec
();
// TODO
}
#include
"translatorplugin.moc"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment