2021-01-26 Fred Gleason <fredg@paravelsystems.com>

* Added 'RDTableView' and 'RDTreeView' base viewer classes.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-01-26 20:37:26 -05:00
parent 2ea048a80b
commit d8f526119e
50 changed files with 222 additions and 171 deletions

View File

@@ -100,13 +100,9 @@ AudioCart::AudioCart(AudioControls *controls,RDCart *cart,QString *path,
//
// Cart Cut List
//
rdcart_cut_view=new QTableView(this);
rdcart_cut_view->setGeometry(100,0,430,sizeHint().height());
rdcart_cut_view->setSelectionBehavior(QAbstractItemView::SelectRows);
rdcart_cut_view=new RDTableView(this);
rdcart_cut_view->setSelectionMode(QAbstractItemView::ExtendedSelection);
rdcart_cut_view->setShowGrid(false);
rdcart_cut_view->setSortingEnabled(false);
rdcart_cut_view->setWordWrap(false);
rdcart_cut_view->setGeometry(100,0,430,sizeHint().height());
rdcart_cut_model=NULL;
connect(rdcart_cut_view,SIGNAL(doubleClicked(const QModelIndex &)),
this,SLOT(doubleClickedData(const QModelIndex &)));

View File

@@ -22,10 +22,10 @@
#define AUDIO_CART_H
#include <QProgressDialog>
#include <QTableView>
#include <rdcart.h>
#include <rdcutlistmodel.h>
#include <rdtableview.h>
#include <rdwidget.h>
#include "audio_controls.h"
@@ -71,7 +71,7 @@ class AudioCart : public RDWidget
private:
QModelIndex SingleSelectedLine() const;
RDCart *rdcart_cart;
QTableView *rdcart_cut_view;
RDTableView *rdcart_cut_view;
RDCutListModel *rdcart_cut_model;
unsigned rdcart_average_length;
QString *rdcart_import_path;

View File

@@ -2,7 +2,7 @@
//
// QTreeView widget that supports cart dragging.
//
// (C) Copyright 2020 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2020-2021 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -28,7 +28,7 @@
#include "libraryview.h"
LibraryView::LibraryView(QWidget *parent)
: QTreeView(parent)
: RDTreeView(parent)
{
}

View File

@@ -2,7 +2,7 @@
//
// QTreeView widget that supports cart dragging.
//
// (C) Copyright 2020 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2020-2021 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -21,9 +21,9 @@
#ifndef LIBRARYVIEW_H
#define LIBRARYVIEW_H
#include <QTreeView>
#include <rdtreeview.h>
class LibraryView : public QTreeView
class LibraryView : public RDTreeView
{
Q_OBJECT
public: