Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>feat/libmpv-backend
parent
62ee1ff78b
commit
24b7f3423a
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Kaffeine libmpv part
|
||||
* Copyright (C) 2023 Mavridis Philippe <mavridisf@gmail.com>
|
||||
*
|
||||
* 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) any later version.
|
||||
*
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
// Part
|
||||
#include "libmpv_widget.h"
|
||||
#include "libmpv_part.h"
|
||||
|
||||
MpvContainerWidget::MpvContainerWidget(MpvPart *part, TQWidget* parentWidget)
|
||||
: TQWidget(parentWidget), m_part(part)
|
||||
{
|
||||
setBackgroundColor(TQt::black);
|
||||
setFocusPolicy(TQ_ClickFocus);
|
||||
}
|
||||
|
||||
MpvContainerWidget::~MpvContainerWidget() {
|
||||
}
|
||||
|
||||
void MpvContainerWidget::contextMenuEvent(TQContextMenuEvent *) {
|
||||
m_part->showContextMenu();
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Kaffeine libmpv part
|
||||
* Copyright (C) 2023 Mavridis Philippe <mavridisf@gmail.com>
|
||||
*
|
||||
* 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) any later version.
|
||||
*
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __LIBMPVWIDGET_H__
|
||||
#define __LIBMPVWIDGET_H__
|
||||
|
||||
#include <tqwidget.h>
|
||||
|
||||
class MpvPart;
|
||||
|
||||
class MpvContainerWidget : public TQWidget {
|
||||
public:
|
||||
MpvContainerWidget(MpvPart *part, TQWidget *parentWidget);
|
||||
~MpvContainerWidget();
|
||||
|
||||
private:
|
||||
void contextMenuEvent(TQContextMenuEvent *);
|
||||
|
||||
private:
|
||||
MpvPart *m_part;
|
||||
};
|
||||
|
||||
#endif // __LIBMPVWIDGET_H__
|
Loading…
Reference in new issue