1
/***************************************************************************
2
mixxxview.cpp - description
4
begin : Mon Feb 18 09:48:17 CET 2002
5
copyright : (C) 2002 by Tue and Ken Haste Andersen
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
18
#include "mixxxview.h"
23
MixxxView::MixxxView(QWidget *parent, MixxxDoc *doc) : QWidget(parent)
25
/** connect doc with the view*/
26
connect(doc, SIGNAL(documentChanged()), this, SLOT(slotDocumentChanged()));
29
playcontrol = new DlgPlaycontrol(this);
30
channel = new DlgChannel(this);
31
playlist = new DlgPlaylist(this);
34
mainGrid = new QGridLayout(this,1,1); // A layout on a widget
35
//hMainBox->setResizeMode(QLayout::Minimum);
36
mainGrid->addWidget(channel,0,0);
37
mainGrid->addWidget(playcontrol,0,1);
38
mainGrid->addMultiCellWidget(playlist,1,1,0,1);
40
//let the ratio between the widths of columns 0 and 1 be 2:3.
41
mainGrid->setColStretch( 0, 150);
42
mainGrid->setColStretch( 1, 310);
43
mainGrid->setRowStretch( 0, 310);
44
mainGrid->setRowStretch( 1, 210);
48
d.setFilter(QDir::Files);
50
qWarning( "Cannot find the ./music directory" );
54
const QFileInfoList *list = d.entryInfoList();
55
QFileInfoListIterator it(*list); // create list iterator
56
QFileInfo *fi; // pointer for traversing
58
while ((fi=it.current()) && (i<playlist->TableList->numRows())) { // for each file...
59
playlist->TableList->setItem(i,0,new QTableItem(playlist->TableList,QTableItem::Never,
61
++it; // goto next list element
68
MixxxView::~MixxxView()
72
void MixxxView::slotDocumentChanged()
74
//TODO update the view