X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Frecmonitor.cpp;h=9ec0c44257d70bde6ec5e3507112097dbadaa96d;hb=bae96d4b906092465a7624195a55b6527529cd7c;hp=a2b8906ab09d9e24079a1557720f4059a026b0a0;hpb=87e34435cbb42c67c699b0539b5b0d93a4f9ebf9;p=kdenlive diff --git a/src/recmonitor.cpp b/src/recmonitor.cpp index a2b8906a..9ec0c442 100644 --- a/src/recmonitor.cpp +++ b/src/recmonitor.cpp @@ -35,11 +35,7 @@ #include #include #include - -#if KDE_IS_VERSION(4,2,0) #include -#endif - #include #include #include @@ -112,7 +108,6 @@ RecMonitor::RecMonitor(QString name, MonitorManager *manager, QWidget *parent) : 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()); @@ -122,7 +117,6 @@ RecMonitor::RecMonitor(QString name, MonitorManager *manager, QWidget *parent) : 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; @@ -165,9 +159,7 @@ RecMonitor::RecMonitor(QString name, MonitorManager *manager, QWidget *parent) : 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; @@ -203,10 +195,8 @@ void RecMonitor::slotUpdateCaptureFolder(const QString ¤tProjectFolder) 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) @@ -539,9 +529,7 @@ void RecMonitor::slotRecord() 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) { @@ -792,12 +780,9 @@ void RecMonitor::slotProcessStatus(QProcess::ProcessState status) } 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); @@ -860,21 +845,17 @@ void RecMonitor::manageCapturedFiles() // 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)