Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
Bug fix & add title bar
Browse files Browse the repository at this point in the history
UI is still ugly
  • Loading branch information
AG3 committed Oct 14, 2014
1 parent 502c5e6 commit e86dcc1
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
38 changes: 35 additions & 3 deletions MainUI.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ Rectangle {
width:RootWidth
height:RootHeight
id:root;


ListView{
id:listview
width:parent.width
height:parent.height/8*7
height:parent.height/4*3
y:parent.height/8

x:0
y:0
model:AFIM
delegate: Rectangle{
width:listview.width
Expand Down Expand Up @@ -137,7 +139,7 @@ Rectangle {
text:"设置"
color: "white"
font.family: "微软雅黑"
font.bold: true
//font.bold: true
verticalAlignment: Text.AlignVCenter
font.pointSize: 15
styleColor: "#ffffff"
Expand All @@ -152,4 +154,34 @@ Rectangle {
}
}
}

Rectangle{
width:parent.width
height:parent.height/8
color:"lightblue"
Text{
height: parent.height
width:parent.width/2
text:"持续时间"
font.family: "微软雅黑"
font.bold: true
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter

font.pointSize: 19
color: "purple"
}
Text{
height: parent.height
width:parent.width/2
x:parent.width/2
text:"创建时间"
font.family: "微软雅黑"
font.bold: true
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pointSize: 19
color: "purple"
}
}
}
3 changes: 1 addition & 2 deletions WechatAudioManager.pro
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ MOBILITY =
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android

OTHER_FILES += \
android/AndroidManifest.xml \
MainUI.qml
android/AndroidManifest.xml

RESOURCES += \
source.qrc
Expand Down
8 changes: 4 additions & 4 deletions backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Backend::Backend(QObject *parent) :
flag=false;
ind=0;
AFIM=new AudioFileInfoModel();
AFIM->addAudioFileInfo(AudioFileInfo("时长 ","创建日期",0));
//AFIM->addAudioFileInfo(AudioFileInfo("时长 ","创建日期",0));
player=new QMediaPlayer();
connect(player,SIGNAL(durationChanged(qint64)),this,SLOT(getDuration(qint64)),Qt::DirectConnection);
}
Expand Down Expand Up @@ -113,7 +113,7 @@ void Backend::addItems()
if(q.front()<10) t="0"+QString::number(q.front());
else t=QString::number(q.front());
q.pop_front();
AFIM->addAudioFileInfo(AudioFileInfo(t+"",resList[ind].created().toString("mm月yy年 hh:mm:ss"),ind+1));
AFIM->addAudioFileInfo(AudioFileInfo(t+"",resList[ind].created().toString("MM月dd日 hh:mm:ss"),ind+1));
ind++;
}
}
Expand All @@ -122,11 +122,11 @@ void Backend::copyFile(QString ind)
{
qDebug()<<"!!!";
int index=ind.toInt()-1;
QDir myDir("D:/sdcard/");
QDir myDir("/sdcard/");
if(!QDir(myDir.absolutePath()+"WeChatAudioManager").exists())
myDir.mkdir("WeChatAudioManager");
myDir.setPath("/sdcard/WeChatAudioManager/");

QFile::copy(resList[index].absoluteFilePath(),myDir.absolutePath()+"/"+resList[index].fileName());
//QMessageBox::warning(this,"文件拷贝成功","当前语音消息已拷贝至"+myDir.absolutePath()+"中!请用文件管理器查看!");
//QMessageBox::information(0,"文件拷贝成功","当前语音消息已拷贝至"+myDir.absolutePath()+"中!请用文件管理器查看!",QMessageBox::Yes);
}

0 comments on commit e86dcc1

Please sign in to comment.