File: wtreeitemfile.cpp

package info (click to toggle)
mixxx 1.4.2-1.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 10,676 kB
  • ctags: 4,130
  • sloc: ansic: 35,627; cpp: 27,118; xml: 3,691; sh: 417; makefile: 54
file content (44 lines) | stat: -rw-r--r-- 934 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// C++ Implementation: wtreeitemfile
//
// Description: 
//
//
// Author: Tue Haste Andersen <haste@diku.dk>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include <qcursor.h>
#include <qpopupmenu.h>
#include <qdragobject.h>
#include "track.h"
#include "wtreeitemfile.h"
#include "wtreeview.h"

WTreeItemFile::WTreeItemFile(WTreeItem *parent, const QString &s1, const QString &s2) : WTreeItem( parent, s1, s2 )
{
}

WTreeItemFile::~WTreeItemFile()
{
}

void WTreeItemFile::popupMenu()
{
    QPopupMenu *menu = new QPopupMenu();
    menu->insertItem("Player 1", this, SLOT(slotLoadPlayer1()));
    menu->insertItem("Player 2", this, SLOT(slotLoadPlayer2()));
    menu->exec(QCursor::pos());
}


void WTreeItemFile::slotLoadPlayer1()
{
    spTrack->slotLoadPlayer1(WTreeView::fullPath(this));
}

void WTreeItemFile::slotLoadPlayer2()
{
    spTrack->slotLoadPlayer2(WTreeView::fullPath(this));
}