From: Mauro Carvalho Chehab <m.chehab@samsung.com>
To: "Bård Eirik Winther" <bwinther@cisco.com>,
"Hans Verkuil" <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCHv2 FINAL 2/6] qv4l2: add hotkeys for common operations
Date: Tue, 30 Jul 2013 09:39:02 -0300 [thread overview]
Message-ID: <20130730093902.51d196b5@samsung.com> (raw)
In-Reply-To: <1724e63348e1dedd4b740bb37ec1dface271a00a.1375172029.git.bwinther@cisco.com>
Hi Bård/Hans,
Em Tue, 30 Jul 2013 10:15:20 +0200
Bård Eirik Winther <bwinther@cisco.com> escreveu:
> CTRL + V : When main window is selected start capture.
> This gives an option other than the button to start recording,
> as this is a frequent operation when using the utility.
> CTRL + W : When CaptureWin is selected close capture window
> It makes it easier to deal with high resolutions video on
> small screen, especially when the window close button may
> be outside the monitor when repositioning the window.
It would be great if you could also add some documentation for qv4l2,
adding there the supported hot keys.
IMO, the better is to write it as a man page. If you need an example,
you could take a look at utils/keytable/ir-keytable.1.
At the building system, all that it is needed is to add something like
what's there at utils/keytable/Makefile.am:
man_MANS = ir-keytable.1
Thanks,
Mauro
>
> Signed-off-by: Bård Eirik Winther <bwinther@cisco.com>
> ---
> utils/qv4l2/capture-win.cpp | 8 ++++++++
> utils/qv4l2/capture-win.h | 4 +++-
> utils/qv4l2/qv4l2.cpp | 1 +
> 3 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/utils/qv4l2/capture-win.cpp b/utils/qv4l2/capture-win.cpp
> index 6798252..a94c73d 100644
> --- a/utils/qv4l2/capture-win.cpp
> +++ b/utils/qv4l2/capture-win.cpp
> @@ -35,6 +35,14 @@ CaptureWin::CaptureWin()
>
> vbox->addWidget(m_label);
> vbox->addWidget(m_msg);
> +
> + hotkeyClose = new QShortcut(Qt::CTRL+Qt::Key_W, this);
> + QObject::connect(hotkeyClose, SIGNAL(activated()), this, SLOT(close()));
> +}
> +
> +CaptureWin::~CaptureWin()
> +{
> + delete hotkeyClose;
> }
>
> void CaptureWin::setImage(const QImage &image, const QString &status)
> diff --git a/utils/qv4l2/capture-win.h b/utils/qv4l2/capture-win.h
> index e861b12..4115d56 100644
> --- a/utils/qv4l2/capture-win.h
> +++ b/utils/qv4l2/capture-win.h
> @@ -21,6 +21,7 @@
> #define CAPTURE_WIN_H
>
> #include <QWidget>
> +#include <QShortcut>
> #include <sys/time.h>
>
> class QImage;
> @@ -32,7 +33,7 @@ class CaptureWin : public QWidget
>
> public:
> CaptureWin();
> - virtual ~CaptureWin() {}
> + ~CaptureWin();
>
> void setImage(const QImage &image, const QString &status);
>
> @@ -45,6 +46,7 @@ signals:
> private:
> QLabel *m_label;
> QLabel *m_msg;
> + QShortcut *hotkeyClose;
> };
>
> #endif
> diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp
> index a8fcc65..bb1d84f 100644
> --- a/utils/qv4l2/qv4l2.cpp
> +++ b/utils/qv4l2/qv4l2.cpp
> @@ -78,6 +78,7 @@ ApplicationWindow::ApplicationWindow() :
> m_capStartAct->setStatusTip("Start capturing");
> m_capStartAct->setCheckable(true);
> m_capStartAct->setDisabled(true);
> + m_capStartAct->setShortcut(Qt::CTRL+Qt::Key_V);
> connect(m_capStartAct, SIGNAL(toggled(bool)), this, SLOT(capStart(bool)));
>
> m_snapshotAct = new QAction(QIcon(":/snapshot.png"), "&Make Snapshot", this);
--
Cheers,
Mauro
next prev parent reply other threads:[~2013-07-30 12:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 8:15 [PATCHv2 FINAL 0/6] qv4l2: add OpenGL rendering and window fixes Bård Eirik Winther
2013-07-30 8:15 ` [PATCHv2 FINAL 1/6] qv4l2: move function ctrlEvent Bård Eirik Winther
2013-07-30 8:15 ` [PATCHv2 FINAL 2/6] qv4l2: add hotkeys for common operations Bård Eirik Winther
2013-07-30 12:39 ` Mauro Carvalho Chehab [this message]
2013-07-30 8:15 ` [PATCHv2 FINAL 3/6] qv4l2: fix minimum size in capture win to frame size Bård Eirik Winther
2013-07-30 8:15 ` [PATCHv2 FINAL 4/6] qv4l2: add Capture menu Bård Eirik Winther
2013-07-30 8:15 ` [PATCHv2 FINAL 5/6] qv4l2: new modular capture window design Bård Eirik Winther
2013-07-30 8:15 ` [PATCHv2 FINAL 6/6] qv4l2: add OpenGL rendering Bård Eirik Winther
2013-08-01 11:05 ` Bård Eirik Winther
2013-07-30 13:12 ` [PATCHv2 FINAL 0/6] qv4l2: add OpenGL rendering and window fixes Mauro Carvalho Chehab
2013-07-31 5:57 ` Bård Eirik Winther
2013-07-31 10:58 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130730093902.51d196b5@samsung.com \
--to=m.chehab@samsung.com \
--cc=bwinther@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox