资源简介
该源码为多媒体播放器源码包,是基于linux下Qt编写的程序,具有一般多媒体播放器的功能:快进,快退,音量,时间等等。对Qt学习很有帮助。

代码片段和文件信息
#include “frame.h“
#include
#include
#include
#include yle>
#include
#include ame>
frame::frame()
{
m_mouse_down = false;
setframeShape(Panel);
// Make this a borderless window which can‘t
// be resized or moved via the window system
setWindowFlags(Qt::framelessWindowHint);
setMouseTracking(true);
m_titleBar = new titleBar(this);
m_content = new QWidget(this);
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->addWidget(m_titleBar);
vbox->setMargin(0);
vbox->setSpacing(0);
QVBoxLayout *layout = new QVBoxLayout(this);
layout->addWidget(m_content);
layout->setMargin(0);
layout->setSpacing(0);
vbox->addLayout(layout);
}
void frame::mousePressEvent(QMouseEvent *e)
{
m_old_pos = e->pos();
m_mouse_down = e->button() == Qt::LeftButton;
}
void frame::mouseMoveEvent(QMouseEvent *e)
{
int x = e->x();
int y = e->y();
if (m_mouse_down) {
int dx = x - m_old_pos.x();
int dy = y - m_old_pos.y();
QRect g = geometry();
if (left)
g.setLeft(g.left() + dx);
if (right)
g.setRight(g.right() + dx);
if (bottom)
g.setBottom(g.bottom() + dy);
setGeometry(g);
m_old_pos = QPoint(!left ? e->x() : m_old_pos.x() e->y());
} else {
QRect r = rect();
left = qAbs(x - r.left()) <= 5;
right = qAbs(x - r.right()) <= 5;
bottom = qAbs(y - r.bottom()) <= 5;
bool hor = left | right;
if (hor && bottom) {
if (left)
setCursor(Qt::SizeBDiagCursor);
else
setCursor(Qt::SizeFDiagCursor);
} else if (hor) {
setCursor(Qt::SizeHorCursor);
} else if (bottom) {
setCursor(Qt::SizeVerCursor);
} else {
setCursor(Qt::ArrowCursor);
}
}
}
void frame::mouseReleaseEvent(QMouseEvent *e)
{
m_mouse_down = false;
}
void frame::set_titleBartxt( QString txt)
{
this->m_titleBar->settitletxt(txt);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 614454 2010-09-26 23:35 haohao_old\ti
文件 421 2010-09-28 04:05 haohao_old\haohao.pro
文件 47972 2010-09-28 13:52 haohao_old\qrc_haohao.o
文件 5454 2010-09-26 06:13 haohao_old\play.bmp
文件 2654 2010-09-26 07:27 haohao_old\quit.bmp
文件 9887 2010-09-28 04:04 haohao_old\haohao.pro.user
文件 196170 2010-09-28 13:52 haohao_old\haohao_old
文件 2317 2010-09-27 08:14 haohao_old\fr
文件 11330 2010-09-27 00:56 haohao_old\widget.ui
文件 262946 2010-09-26 05:50 haohao_old\bj1.bmp
文件 421 2010-09-28 13:51 haohao_old\haohao_old.pro
文件 1592 2010-09-28 08:55 haohao_old\haohao.h
文件 651 2010-09-27 08:14 haohao_old\fr
文件 2749646 2010-10-10 15:48 haohao_old\riben.mp4
文件 2986 2010-09-27 07:56 haohao_old\ti
文件 10776 2010-09-28 13:51 haohao_old\fr
文件 8556 2010-09-28 13:52 haohao_old\moc_ti
文件 9605 2010-09-28 13:51 haohao_old\Makefile
文件 11395 2010-09-28 13:51 haohao_old\ui_widget.h
文件 3153 2010-09-28 13:52 haohao_old\moc_widget.cpp
文件 221238 2010-09-26 23:43 haohao_old\ti
文件 8708 2010-09-28 13:52 haohao_old\moc_widget.o
文件 501138 2010-09-26 05:45 haohao_old\vback.bmp
文件 5454 2010-09-26 08:00 haohao_old\play_stop.bmp
文件 726 2010-09-28 13:51 haohao_old\main.cpp
文件 5454 2010-09-26 06:13 haohao_old\next1.bmp
文件 5454 2010-09-26 06:13 haohao_old\pre.bmp
文件 786 2010-09-27 07:57 haohao_old\ti
文件 2263 2010-09-28 13:51 haohao_old\moc_ti
文件 13047402 2010-09-27 16:41 haohao_old\mpla
............此处省略14个文件信息
- 上一篇:语音增强算法
- 下一篇:802.3bw-2015
相关资源
- IAR For ARM 7.3最新注册机
- 郭天祥ARM9视频教程
- IAR ARM 7.8破解
- IAR For ARM V5.5 注册机
- IAR for ARM 7.40 破解
- IAR For ARM 7.4 破解
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- ubuntu9.10 可加载内核模块和字符设备驱
- arm触摸屏与LCD校准程序三点校准法
- MP3文件ID3v2ID3v2APEv2标签读取
- ARM嵌入式项目实战
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- 基于ARM蓝牙传输源程序
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- USB 驱动 让电脑与arm进行通信
- linux 网络实验 ftp程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
评论
共有 条评论