Using libcdio to fetch tracks, need visual adjustments, code cleanup and actual ripping;
This commit is contained in:
parent
58b264e122
commit
cda9f76a6f
@ -1,11 +1,33 @@
|
||||
#include "ripcd.h"
|
||||
#include "config.h"
|
||||
#include "ui_ripcd.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QFrame>
|
||||
#include <QtDebug>
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/cdtext.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
RipCD::RipCD(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui_.setupUi(this);
|
||||
setWindowTitle(tr("Rip CD"));
|
||||
//QFrame *_frame = new QFrame();
|
||||
//QCheckBox *_t = new QCheckBox(tr(""), ui_.tableWidget);
|
||||
|
||||
//track_t i_first_track;
|
||||
track_t i_tracks;
|
||||
CdIo_t *p_cdio;
|
||||
p_cdio = cdio_open(NULL, DRIVER_UNKNOWN);
|
||||
//i_first_track = cdio_get_first_track_num(p_cdio);
|
||||
i_tracks = cdio_get_num_tracks(p_cdio);
|
||||
ui_.tableWidget->setRowCount(i_tracks);
|
||||
for(int i=0; i<i_tracks; i++) {
|
||||
qDebug() << i;
|
||||
QCheckBox *_t = new QCheckBox(tr(""), ui_.tableWidget);
|
||||
ui_.tableWidget->setCellWidget(i,0,_t);
|
||||
ui_.tableWidget->setCellWidget(i,1,new QLabel(QString::number(i)));
|
||||
}
|
||||
cdio_destroy(p_cdio);
|
||||
}
|
||||
|
155
src/ui/ripcd.ui
155
src/ui/ripcd.ui
@ -2,12 +2,15 @@
|
||||
<ui version="4.0">
|
||||
<class>RipCD</class>
|
||||
<widget class="QDialog" name="RipCD">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::NonModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<width>601</width>
|
||||
<height>439</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -16,8 +19,8 @@
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<x>240</x>
|
||||
<y>390</y>
|
||||
<width>341</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
@ -29,40 +32,134 @@
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<widget class="QWidget" name="gridLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>137</y>
|
||||
<width>571</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" rowstretch="0,0,0">
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="2" column="3" alignment="Qt::AlignLeft">
|
||||
<widget class="QLabel" name="year_label">
|
||||
<property name="text">
|
||||
<string>Year</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="QLabel" name="disc_label">
|
||||
<property name="text">
|
||||
<string>Disc</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="title_label">
|
||||
<property name="text">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="6">
|
||||
<widget class="QLineEdit" name="titleLineEdit"/>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<widget class="QLineEdit" name="discLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4" alignment="Qt::AlignLeft">
|
||||
<widget class="QLineEdit" name="yearLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="artist_label">
|
||||
<property name="text">
|
||||
<string>Artist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="genreLineEdit"/>
|
||||
</item>
|
||||
<item row="2" column="0" alignment="Qt::AlignLeft">
|
||||
<widget class="QLabel" name="genre_label">
|
||||
<property name="text">
|
||||
<string>Genre</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="6">
|
||||
<widget class="QLineEdit" name="artistLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gridLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>381</width>
|
||||
<height>221</height>
|
||||
<width>571</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="log_destiny"/>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="columnCount">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>10</number>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderShowSortIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Track</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Artist</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Duration</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>240</y>
|
||||
<width>98</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PushButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
Loading…
x
Reference in New Issue
Block a user