summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Tinkl <[email protected]>2014-12-10 01:21:18 +0100
committerLukáš Tinkl <[email protected]>2014-12-10 01:26:19 +0100
commit74b0fe466c750005a6a324ff1a7a105bf69c3cb9 (patch)
treec2361d46decb568a2623859d057f505cba65116c
parenta60f1ace56ae4ccb449ef73bb62df83427cfefbb (diff)
drop unused stuff
-rw-r--r--src/app/CMakeLists.txt1
-rw-r--r--src/app/adjustSizeButton.cpp1
-rw-r--r--src/app/extern.h38
-rw-r--r--src/app/mainWindow.cpp1
-rw-r--r--src/app/textItem.cpp88
-rw-r--r--src/app/textItem.h45
6 files changed, 0 insertions, 174 deletions
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
index 033026f..d418f5c 100644
--- a/src/app/CMakeLists.txt
+++ b/src/app/CMakeLists.txt
@@ -10,7 +10,6 @@ set(videoplayer_app_SRCS
analyzer/fht.cpp
audioView2.cpp
stateChange.cpp
- textItem.cpp
playDialog.cpp
discSelectionDialog.cpp
adjustSizeButton.cpp
diff --git a/src/app/adjustSizeButton.cpp b/src/app/adjustSizeButton.cpp
index d27e237..720df71 100644
--- a/src/app/adjustSizeButton.cpp
+++ b/src/app/adjustSizeButton.cpp
@@ -33,7 +33,6 @@
#include <QPainter>
#include <QTimerEvent>
-#include "extern.h"
#include "theStream.h"
#include "videoWindow.h" //videoWindow()
diff --git a/src/app/extern.h b/src/app/extern.h
deleted file mode 100644
index a9454ce..0000000
--- a/src/app/extern.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/************************************************************************
- * Copyright 2005 Max Howell <[email protected]>
- * 2007 Ian Monroe <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License or (at your option) version 3 or any later version
- * accepted by the membership of KDE e.V. (or its successor approved
- * by the membership of KDE e.V.), which shall act as a proxy
- * defined in Section 14 of version 3 of the license.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- ***********************************************************************/
-
-#ifndef DRAGONPLAYER_EXTERN_H
-#define DRAGONPLAYER_EXTERN_H
-
-#include <QMenu>
-//I think this whole file is deprecated - Dave
-class QWidget;
-
-namespace Dragon
-{
- class VideoWindow;
-
-
- void showVideoSettingsDialog( QWidget* );
- void insertAspectRatioMenuItems( QMenu* );
-}
-
-#endif
diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp
index fdfd860..777467b 100644
--- a/src/app/mainWindow.cpp
+++ b/src/app/mainWindow.cpp
@@ -68,7 +68,6 @@
#include "actions.h"
#include "discSelectionDialog.h"
#include "mpris2/mpris2.h"
-#include "extern.h" //dialog creation function definitions
#include "fullScreenToolBarHandler.h"
#include "messageBox.h"
#include "playDialog.h" //::play()
diff --git a/src/app/textItem.cpp b/src/app/textItem.cpp
deleted file mode 100644
index d60d0e1..0000000
--- a/src/app/textItem.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/***********************************************************************
-* Copyright 2010 Ian Monroe <[email protected]>
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License as
-* published by the Free Software Foundation; either version 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-***********************************************************************/
-
-#include "textItem.h"
-
-#include <QDebug>
-#include <QTextDocument>
-#include <QSizeF>
-#include <QWidget>
-
-ExpandingTextItem::ExpandingTextItem(QGraphicsWidget* parent)
- : QGraphicsTextItem(parent), QGraphicsLayoutItem()
-{
-
-}
-
-ExpandingTextItem::~ExpandingTextItem()
-{ }
-
-QSizeF
-ExpandingTextItem::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const
-{
- //credit to: psih128
- // http://www.qtcentre.org/threads/16533-Subclassing-QGraphicsTextItem-and-QGraphicsLayoutItem
- switch (which) {
- case Qt::MinimumSize:
- return QSizeF(0, 0);
- case Qt::PreferredSize:
- return document()->size();
- case Qt::MaximumSize:
- return QSizeF(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
- default:
- qWarning("TextItem::sizeHint(): Don't know how to handle the value of 'which'");
- break;
- }
- return constraint;
-
-}
-
-void
-ExpandingTextItem::setGeometry(const QRectF& rect)
-{
- QFont theFont = font();
-
- int size = qMin(static_cast<int>(rect.height()), 40);
-
- theFont.setPixelSize(size);
- QFontMetricsF fm(theFont);
- while(fm.width(toPlainText()) > rect.width())
- {
- size -= 5;
- theFont.setPixelSize(size);
- fm = QFontMetricsF(theFont);
- }
-
- setFont(theFont);
- setPos(rect.topLeft());
-}
-
-void
-ExpandingTextItem::updateGeometry()
-{
- QGraphicsLayoutItem::updateGeometry();
-}
-
-void
-ExpandingTextItem::setPlainText(const QString& text)
-{
- QGraphicsTextItem::setPlainText(text);
- updateGeometry();
-}
diff --git a/src/app/textItem.h b/src/app/textItem.h
deleted file mode 100644
index 5cf78ea..0000000
--- a/src/app/textItem.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/***********************************************************************
-* Copyright 2010 Ian Monroe <[email protected]>
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License as
-* published by the Free Software Foundation; either version 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-***********************************************************************/
-
-#ifndef TEXTITEM_H
-#define TEXTITEM_H
-
-#include <QGraphicsWidget>
-#include <QGraphicsTextItem>
-
-/**
- * A QGV text widget which will automatically change its font size based on
- * the space available.
- **/
-class ExpandingTextItem : public QGraphicsTextItem, public QGraphicsLayoutItem
-{
- Q_OBJECT
- Q_INTERFACES(QGraphicsLayoutItem)
-public:
- ExpandingTextItem(QGraphicsWidget* parent = 0);
- ~ExpandingTextItem();
- void setPlainText(const QString& text);
- void setGeometry(const QRectF& rect) Q_DECL_OVERRIDE;
-protected:
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint = QSizeF()) const Q_DECL_OVERRIDE;
- void updateGeometry() Q_DECL_OVERRIDE;
-};
-
-#endif // TEXTITEM_H