# Minimum versions of main dependencies.
set(LIBMLT_MIN_VERSION 0.7.6)
-set(QT_MIN_VERSION 4.6.0)
-set(KDE_MIN_VERSION 4.4.0)
+set(QT_MIN_VERSION 4.5.0)
+set(KDE_MIN_VERSION 4.3.0)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
generateItems(others, otherUrls);
generateItems(proxies, proxyUrls);
-#if QT_VERSION >= 0x040500
allFonts.removeDuplicates();
-#endif
//TODO: fonts
if (!luma.isEmpty()) urls << KUrl(luma).path();
}
}
-#if QT_VERSION >= 0x040500
urls.removeDuplicates();
-#endif
return urls;
}
m_view.vobs_list->header()->setResizeMode(1, QHeaderView::Custom);
m_view.vobs_list->header()->setResizeMode(2, QHeaderView::Custom);
-#if KDE_IS_VERSION(4,2,0)
m_capacityBar = new KCapacityBar(KCapacityBar::DrawTextInline, this);
QHBoxLayout *layout = new QHBoxLayout;
layout->addWidget(m_capacityBar);
m_view.size_box->setLayout(layout);
-#else
- m_view.size_box->setHidden(true);
-#endif
slotCheckVobList();
}
DvdWizardVob::~DvdWizardVob()
{
-#if KDE_IS_VERSION(4,2,0)
delete m_capacityBar;
-#endif
}
if (hasItem && m_view.vobs_list->indexOfTopLevelItem(item) == max - 1) m_view.button_down->setEnabled(false);
else m_view.button_down->setEnabled(hasItem);
-#if KDE_IS_VERSION(4,2,0)
qint64 totalSize = 0;
for (int i = 0; i < max; i++) {
item = m_view.vobs_list->topLevelItem(i);
qint64 maxSize = (qint64) 47000 * 100000;
m_capacityBar->setValue(100 * totalSize / maxSize);
m_capacityBar->setText(KIO::convertSize(totalSize));
-#endif
}
void DvdWizardVob::slotItemUp()
#include "ui_dvdwizardvob_ui.h"
#include <kdeversion.h>
-
-#if KDE_IS_VERSION(4,2,0)
#include <kcapacitybar.h>
-#endif
-
#include <KUrl>
#include <QWizardPage>
private:
Ui::DvdWizardVob_UI m_view;
QString m_errorMessage;
-
-#if KDE_IS_VERSION(4,2,0)
KCapacityBar *m_capacityBar;
-#endif
public slots:
void slotAddVobFile(KUrl url = KUrl(), const QString &chapters = QString());
KdenliveSettings::setShuttlebuttons(maps);
#endif
-#if KDE_IS_VERSION(4,3,0)
KConfigDialog::settingsChangedSlot();
-#endif
-
//KConfigDialog::updateSettings();
if (resetProfile) emit doResetProfile();
}
QString maps = JogShuttleConfig::actionMap(actions);
m_shuttleModified = KdenliveSettings::shuttlebuttons() != maps;
#endif
-#if KDE_IS_VERSION(4,3,0)
KConfigDialog::updateButtons();
-#endif
}
void KdenliveSettingsDialog::slotDialogModified()
{
m_modified = true;
-#if KDE_IS_VERSION(4,3,0)
KConfigDialog::updateButtons();
-#endif
}
//virtual
KFileDialog *fs = new KFileDialog(KUrl(), "image/png", this);
fs->setOperationMode(KFileDialog::Saving);
fs->setMode(KFile::File);
-#if KDE_IS_VERSION(4,2,0)
fs->setConfirmOverwrite(true);
-#endif
fs->setKeepLocation(true);
fs->exec();
QString path = fs->selectedFile();
usedSize += clip->fileSize();
}
}
-#if QT_VERSION >= 0x040500
allFonts.removeDuplicates();
-#endif
// Hide unused categories
for (int i = 0; i < files_list->topLevelItemCount(); i++) {
if (files_list->topLevelItem(i)->childCount() == 0) {
#include <KFileItem>
#include <KMessageBox>
#include <KApplication>
-
-#if KDE_IS_VERSION(4,2,0)
#include <KDiskFreeSpaceInfo>
-#endif
-
#include <QMouseEvent>
#include <QMenu>
#include <QToolButton>
m_logger.setFrame(false);
//m_logger.setInsertPolicy(QComboBox::InsertAtTop);
-#if KDE_IS_VERSION(4,2,0)
m_freeSpace = new KCapacityBar(KCapacityBar::DrawTextInline, this);
m_freeSpace->setMaximumWidth(150);
QFontMetricsF fontMetrics(font());
connect(&m_spaceTimer, SIGNAL(timeout()), this, SLOT(slotUpdateFreeSpace()));
m_spaceTimer.setInterval(30000);
m_spaceTimer.setSingleShot(false);
-#endif
control_frame_firewire->setLayout(layout);
m_displayProcess = new QProcess;
RecMonitor::~RecMonitor()
{
-#if KDE_IS_VERSION(4,2,0)
m_spaceTimer.stop();
-#endif
delete m_captureProcess;
delete m_displayProcess;
if (m_captureDevice) delete m_captureDevice;
else KMessageBox::information(this, i18n("You need to stop capture before your changes can be applied"), i18n("Capturing"));
} else slotVideoDeviceChanged(device_selector->currentIndex());
-#if KDE_IS_VERSION(4,2,0)
// update free space info
slotUpdateFreeSpace();
-#endif
}
void RecMonitor::slotVideoDeviceChanged(int ix)
m_isCapturing = true;
m_didCapture = true;
m_captureProcess->write("c\n", 3);
-#if KDE_IS_VERSION(4,2,0)
m_spaceTimer.start();
-#endif
return;
}
if (m_captureProcess->state() == QProcess::NotRunning) {
}
m_isCapturing = false;
-#if KDE_IS_VERSION(4,2,0)
m_spaceTimer.stop();
// update free space info
slotUpdateFreeSpace();
-#endif
-
} else {
if (device_selector->currentIndex() != SCREENGRAB) m_stopAction->setEnabled(true);
device_selector->setEnabled(false);
// virtual
void RecMonitor::mousePressEvent(QMouseEvent * /*event*/)
{
-#if KDE_IS_VERSION(4,2,0)
if (m_freeSpace->underMouse()) slotUpdateFreeSpace();
-#endif
}
void RecMonitor::slotUpdateFreeSpace()
{
-#if KDE_IS_VERSION(4,2,0)
KDiskFreeSpaceInfo info = KDiskFreeSpaceInfo::freeSpaceInfo(m_capturePath);
if (info.isValid() && info.size() > 0) {
m_freeSpace->setValue(100 * info.used() / info.size());
m_freeSpace->setText(i18n("Free space: %1", KIO::convertSize(info.available())));
m_freeSpace->update();
}
-#endif
}
void RecMonitor::refreshRecMonitor(bool visible)
#include <KDateTime>
#include <kdeversion.h>
#include <KComboBox>
-
-#if KDE_IS_VERSION(4,2,0)
#include <kcapacitybar.h>
-#endif
class MonitorManager;
class MltDeviceCapture;
KComboBox m_logger;
QString m_capturePath;
-#if KDE_IS_VERSION(4,2,0)
KCapacityBar *m_freeSpace;
QTimer m_spaceTimer;
-#endif
KUrl m_captureFile;
KIcon m_playIcon;
KFileDialog *fs = new KFileDialog(KUrl(m_projectTitlePath), "application/x-kdenlivetitle", this);
fs->setOperationMode(KFileDialog::Saving);
fs->setMode(KFile::File);
-#if KDE_IS_VERSION(4,2,0)
fs->setConfirmOverwrite(true);
-#endif
fs->setKeepLocation(true);
fs->exec();
url = fs->selectedUrl();