⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qmcompactwindow.cpp

📁 可以播放MP3,wma等文件格式的播放器
💻 CPP
字号:
/* qmcompactwindow.cpp * * $Id: qmcompactwindow.cpp,v 1.8 2002/03/13 15:09:36 amos Exp $ * * Apollo sound player: http://www.apolloplayer.org * Copyright(C) 2000-2002 Apollo Team.  See CREDITS file. * * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * The GNU General Public License is also available online at: * * http://www.gnu.org/copyleft/gpl.html */#include "qmcompactwindow.h"#include "qmmainwindow.h"#include "qmpixmapsupplier.h"#include <qiconset.h>#include <qlayout.h>#include <qtoolbutton.h>/** * \file qmcompactwindow.cpp * \brief Apollo as a minimal free-floating toolbar *//*!  \class QmCompactWindow qmcompactwindow.h  \brief Represents the compact control window.  This window has the minimal set of controls and nothing more.*//*!  Contructs a compact window.  Note that \a mainwidget is \emph not the  parent.  It's required in order to send messages to the main window,  but a compact window is typically a top level window (i.e. the parent  is 0).*/QmCompactWindow::QmCompactWindow(	QmMainWindow *mainwidget,	QWidget *parent,	const char *name)	: QWidget(parent, name, WStyle_Customize | WStyle_NoBorderEx),	  m_pMainWindow(mainwidget){	setCaption(tr("Apollo Controller"));	QHBoxLayout *top = new QHBoxLayout(this);    QmPixmapSupplier *sup = QmPixmapSupplier::instance();    m_pPrev = new QToolButton(this);	m_pPrev->setIconSet(QIconSet( sup->pixmap( "icons-prev" )));	m_pPrev->setTextLabel(tr("Previous (Shortcut: Alt+1)"), true);	m_pPrev->setAccel(ALT+'1');	m_pPrev->setAutoRaise(true);	m_pPrev->setFixedSize(m_pPrev->sizeHint());	connect(m_pPrev, SIGNAL(clicked()), m_pMainWindow, SLOT(prev()));    m_pStop = new QToolButton(this);	m_pStop->setIconSet(QIconSet( sup->pixmap( "icons-stop" )));	m_pStop->setTextLabel(tr("Stop (Shortcut: Alt+2)"), true);	m_pStop->setAccel(ALT+'2');	m_pStop->setAutoRaise(true);	m_pStop->setFixedSize(m_pStop->sizeHint());	connect(m_pStop, SIGNAL(clicked()), m_pMainWindow, SLOT(stop()));    m_pPause = new QToolButton(this);	m_pPause->setIconSet(QIconSet( sup->pixmap( "icons-pause" )));	m_pPause->setTextLabel(tr("Pause (Shortcut: Alt+3)"), true);	m_pPause->setAccel(ALT+'3');	m_pPause->setToggleButton(true);	m_pPause->setAutoRaise(true);	m_pPause->setFixedSize(m_pPause->sizeHint());	connect(m_pPause, SIGNAL(clicked()), m_pMainWindow, SLOT(pause()));    m_pPlay = new QToolButton(this);	m_pPlay->setIconSet(QIconSet( sup->pixmap( "icons-play" )));	m_pPlay->setTextLabel(tr("Play (Shortcut: Alt+4)"), true);	m_pPlay->setAccel(ALT+'4');	m_pPlay->setAutoRaise(true);	m_pPlay->setFixedSize(m_pPlay->sizeHint());	connect(m_pPlay, SIGNAL(clicked()), m_pMainWindow, SLOT(play()));    m_pNext = new QToolButton(this);	m_pNext->setIconSet(QIconSet( sup->pixmap( "icons-next" )));	m_pNext->setTextLabel(tr("Next (Shortcut: Alt+5)"), true);	m_pNext->setAccel(ALT+'5');	m_pNext->setAutoRaise(true);	m_pNext->setFixedSize(m_pNext->sizeHint());	connect(m_pNext, SIGNAL(clicked()), m_pMainWindow, SLOT(next()));    m_pMaximize = new QToolButton(this);	m_pMaximize->setIconSet(QIconSet( sup->pixmap( "icons-maximize" )));	m_pMaximize->setTextLabel(tr("Maximize (Short cut: Alt+6)"), true);	m_pMaximize->setAccel(ALT+'6');	m_pMaximize->setAutoRaise(true);	m_pMaximize->setFixedSize(m_pMaximize->sizeHint());	connect(m_pMaximize, SIGNAL(clicked()), this, SLOT(showMainWindow()));	top->addWidget(m_pPrev);	top->addWidget(m_pStop);	top->addWidget(m_pPause);	top->addWidget(m_pPlay);	top->addWidget(m_pNext);	top->addWidget(m_pMaximize);}/*!*/QmCompactWindow::~QmCompactWindow(){}/*!  Hides this window and show the main window.*/voidQmCompactWindow::showMainWindow(){	hide();	m_pMainWindow->show();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -