Commit ec3e3d70 authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

[Code Gardening] More cleanup

- Remove few more unused files
- Set icons in *.ui file where possible
parent 06d7f751
Pipeline #243528 passed with stage
in 5 minutes and 10 seconds
......@@ -127,34 +127,13 @@ CurveParamWidget<CurveWidget_t>::CurveParamWidget(std::shared_ptr<AssetParameter
layout->addWidget(m_edit);
m_edit->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
/*m_leftParam = new ValueLabel<CurveWidget_t>(true, m_mode, this);
m_leftParam->setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
m_leftParam->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
m_bottomParam = new ValueLabel<CurveWidget_t>(false, m_mode, this);
m_bottomParam->setFrameStyle(QFrame::StyledPanel | QFrame::Plain);
m_bottomParam->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
// horizontal layout to make sure that everything is centered
auto *horiz_layout = new QHBoxLayout;
horiz_layout->addWidget(m_leftParam);
horiz_layout->addWidget(m_bottomParam);
layout->addLayout(horiz_layout);*/
auto *widget = new QWidget(this);
widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_ui.setupUi(widget);
layout->addWidget(widget);
// set up icons and initial button states
m_ui.buttonLinkHandles->setIcon(QIcon::fromTheme(QStringLiteral("edit-link")));
m_ui.buttonDeletePoint->setIcon(QIcon::fromTheme(QStringLiteral("list-remove")));
m_ui.buttonZoomIn->setIcon(QIcon::fromTheme(QStringLiteral("zoom-in")));
m_ui.buttonZoomOut->setIcon(QIcon::fromTheme(QStringLiteral("zoom-out")));
m_ui.buttonGridChange->setIcon(QIcon::fromTheme(QStringLiteral("view-grid")));
m_ui.buttonShowPixmap->setIcon(QIcon(QPixmap::fromImage(ColorTools::rgbCurvePlane(QSize(16, 16), ColorTools::ColorsRGB::Luma, 0.8))));
m_ui.buttonResetSpline->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
m_ui.buttonShowAllHandles->setIcon(QIcon::fromTheme(QStringLiteral("draw-bezier-curves")));
m_ui.widgetPoint->setEnabled(false);
m_edit->setGridLines(KdenliveSettings::bezier_gridlines());
m_ui.buttonShowPixmap->setChecked(KdenliveSettings::bezier_showpixmap());
......@@ -247,8 +226,6 @@ template <typename CurveWidget_t> void CurveParamWidget<CurveWidget_t>::setMode(
if (m_showPixmap) {
slotShowPixmap(true);
}
//m_leftParam->setMode(mode);
//m_bottomParam->setMode(mode);
}
}
......
......@@ -54,11 +54,6 @@ EncodingProfilesDialog::EncodingProfilesDialog(EncodingProfilesManager::ProfileT
profile_type->addItem(i18n("Screen Capture"), EncodingProfilesManager::ScreenCapture);
profile_type->addItem(i18n("Decklink Capture"), EncodingProfilesManager::DecklinkCapture);
button_add->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
button_edit->setIcon(QIcon::fromTheme(QStringLiteral("document-edit")));
button_delete->setIcon(QIcon::fromTheme(QStringLiteral("list-remove")));
button_download->setIcon(QIcon::fromTheme(QStringLiteral("download")));
m_configFile = new KConfig(QStringLiteral("encodingprofiles.rc"), KConfig::CascadeConfig, QStandardPaths::AppDataLocation);
profile_type->setCurrentIndex(profileType);
connect(profile_type, static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &EncodingProfilesDialog::slotLoadProfiles);
......
......@@ -124,7 +124,6 @@ SpeechDialog::SpeechDialog(std::shared_ptr<TimelineItemModel> timeline, QPoint z
connect(buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, this, [this]() { slotProcessSpeech(); });
m_stt->parseVoskDictionaries();
frame_progress->setVisible(false);
button_abort->setIcon(QIcon::fromTheme(QStringLiteral("process-stop")));
connect(button_abort, &QToolButton::clicked, this, [this]() {
if (m_speechJob && m_speechJob->state() == QProcess::Running) {
m_speechJob->kill();
......
......@@ -45,14 +45,6 @@ SubtitleEdit::SubtitleEdit(QWidget *parent)
{
setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
setupUi(this);
buttonApply->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok-apply")));
buttonAdd->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
buttonCut->setIcon(QIcon::fromTheme(QStringLiteral("edit-cut")));
buttonIn->setIcon(QIcon::fromTheme(QStringLiteral("zone-in")));
buttonOut->setIcon(QIcon::fromTheme(QStringLiteral("zone-out")));
buttonDelete->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete")));
buttonStyle->setIcon(QIcon::fromTheme(QStringLiteral("format-text-color")));
buttonLock->setIcon(QIcon::fromTheme(QStringLiteral("kdenlive-lock")));
auto *keyFilter = new ShiftEnterFilter(this);
subText->installEventFilter(keyFilter);
connect(keyFilter, &ShiftEnterFilter::triggerUpdate, this, &SubtitleEdit::updateSubtitle);
......
......@@ -595,7 +595,6 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
button_start->setEnabled(false);
connect(button_start, &QPushButton::clicked, this, &TextBasedEdit::startRecognition);
frame_progress->setVisible(false);
button_abort->setIcon(QIcon::fromTheme(QStringLiteral("process-stop")));
connect(button_abort, &QToolButton::clicked, this, [this]() {
if (m_speechJob && m_speechJob->state() == QProcess::Running) {
m_speechJob->kill();
......@@ -630,17 +629,12 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
button_delete->setToolTip(i18n("Delete selected text"));
connect(m_visualEditor->deleteAction, &QAction::triggered, this, &TextBasedEdit::deleteItem);
button_add->setIcon(QIcon::fromTheme(QStringLiteral("document-save-as")));
button_add->setToolTip(i18n("Save edited text in a new playlist"));
button_add->setEnabled(false);
connect(button_add, &QToolButton::clicked, this, [this]() { previewPlaylist(); });
button_bookmark->setDefaultAction(m_visualEditor->bookmarkAction);
button_bookmark->setToolTip(i18n("Add bookmark for current selection"));
connect(m_visualEditor->bookmarkAction, &QAction::triggered, this, &TextBasedEdit::addBookmark);
button_insert->setIcon(QIcon::fromTheme(QStringLiteral("timeline-insert")));
button_insert->setToolTip(i18n("Insert selected blocks in timeline"));
connect(button_insert, &QToolButton::clicked, this, &TextBasedEdit::insertToTimeline);
button_insert->setEnabled(false);
......@@ -651,9 +645,6 @@ TextBasedEdit::TextBasedEdit(QWidget *parent)
// Search stuff
search_frame->setVisible(false);
button_search->setIcon(QIcon::fromTheme(QStringLiteral("edit-find")));
search_prev->setIcon(QIcon::fromTheme(QStringLiteral("go-up")));
search_next->setIcon(QIcon::fromTheme(QStringLiteral("go-down")));
connect(button_search, &QToolButton::toggled, this, [&](bool toggled) {
search_frame->setVisible(toggled);
search_line->setFocus();
......
......@@ -148,7 +148,6 @@ void CutTask::start(const ObjectId &owner, int in, int out, QObject *object, boo
QObject::connect(ui.vcodec, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), d.data(), [callBack]() { callBack(); });
QFontMetrics fm = ui.file_url->lineEdit()->fontMetrics();
ui.file_url->setMinimumWidth(int(fm.boundingRect(ui.file_url->text().left(50)).width() * 1.4));
ui.button_more->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
callBack();
QString mess = i18n("Extracting %1 out of %2", Timecode::getStringTimecode(out - in, pCore->getCurrentFps(), true), binClip->getStringDuration());
ui.info_label->setText(mess);
......
......@@ -73,9 +73,7 @@ ClipStabilize::ClipStabilize(const std::vector<QString> &binIds, QString filterN
m_view->setModel(m_assetModel, QSize(1920, 1080));
m_vbox->addWidget(m_view.get());
// Presets
preset_button->setIcon(QIcon::fromTheme(QStringLiteral("adjustlevels")));
preset_button->setMenu(m_view->presetMenu());
preset_button->setToolTip(i18n("Presets"));
}
connect(buttonBox->button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &ClipStabilize::slotValidate);
......
......@@ -30,7 +30,6 @@ SpeedDialog::SpeedDialog(QWidget *parent, double speed, int duration, double min
ui->speedSlider->setTickInterval(10);
ui->label_dest->setVisible(false);
ui->kurlrequester->setVisible(false);
ui->toolButton->setVisible(false);
if (reversed) {
ui->checkBox->setChecked(true);
}
......
......@@ -27,8 +27,6 @@ GradientWidget::GradientWidget(const QMap<QString, QString> &gradients, int ix,
connect(angle, &QAbstractSlider::valueChanged, this, &GradientWidget::updatePreview);
connect(color1, &KColorButton::changed, this, &GradientWidget::updatePreview);
connect(color2, &KColorButton::changed, this, &GradientWidget::updatePreview);
add_gradient->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
remove_gradient->setIcon(QIcon::fromTheme(QStringLiteral("list-remove")));
connect(add_gradient, SIGNAL(clicked()), this, SLOT(saveGradient()));
connect(remove_gradient, &QAbstractButton::clicked, this, &GradientWidget::deleteGradient);
QFontMetrics metrics(font());
......
......@@ -64,6 +64,10 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="list-remove">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
......@@ -85,6 +89,10 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="edit-link">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
......@@ -108,6 +116,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="view-refresh"/>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
......@@ -140,6 +151,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="view-grid"/>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
......@@ -153,6 +167,10 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="zoom-in">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
......@@ -166,6 +184,10 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="zoom-out">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
......@@ -179,6 +201,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="draw-bezier-curves"/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
......
......@@ -79,13 +79,6 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0" colspan="3">
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>277</width>
<width>294</width>
<height>281</height>
</rect>
</property>
......@@ -63,9 +63,15 @@
</item>
<item row="7" column="0">
<widget class="QToolButton" name="preset_button">
<property name="toolTip">
<string>Presets</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="adjustlevels"/>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>318</width>
<height>323</height>
<width>355</width>
<height>373</height>
</rect>
</property>
<property name="windowTitle">
......@@ -79,6 +79,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="configure"/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
......@@ -158,6 +161,7 @@
<class>KMessageWidget</class>
<extends>QFrame</extends>
<header>kmessagewidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
......
......@@ -38,6 +38,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="list-add"/>
</property>
</widget>
</item>
<item>
......@@ -45,6 +48,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="edit-cut"/>
</property>
</widget>
</item>
<item>
......@@ -52,6 +58,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="dialog-ok-apply"/>
</property>
</widget>
</item>
<item>
......@@ -59,6 +68,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="format-text-color"/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
......@@ -137,6 +149,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="zone-in"/>
</property>
</widget>
</item>
<item row="1" column="2">
......@@ -154,6 +169,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="zone-out"/>
</property>
</widget>
</item>
<item row="2" column="2">
......@@ -171,6 +189,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="kdenlive-lock"/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
......@@ -377,6 +398,9 @@
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset theme="edit-delete"/>
</property>
</widget>
</item>
</layout>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>EffectList_UI</class>
<widget class="QWidget" name="EffectList_UI">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>288</width>
<height>264</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="3">
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QFrame" name="effectlistframe">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
<widget class="QLabel" name="infopanel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</widget>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="buttonInfo">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>3</number>
</property>
<item>
<widget class="QToolButton" name="effectsAll">
<property name="text">
<string>...</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="effectsVideo">
<property name="text">
<string>...</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="effectsAudio">
<property name="text">
<string>...</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="effectsGPU">
<property name="text">
<string>...</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="effectsCustom">
<property name="text">
<string>...</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GeometryWidget_UI</class>
<widget class="QWidget" name="GeometryWidget_UI">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>312</width>
<height>183</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QWidget" name="widgetTimeWrapper" native="true">
<layout class="QGridLayout" name="gridLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="3">
<widget class="QToolButton" name="buttonOptions">
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="4">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QToolButton" name="buttonAddDelete">
<property name="text">
<string>...</string>
</property>