Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Greedysky/QtSpek
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: fn-ix/qt-spek
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Jan 22, 2022

  1. Update main.cpp

    fn-ix authored Jan 22, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    adc77c4 View commit details
  2. Add files via upload

    fn-ix authored Jan 22, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2114e68 View commit details
  3. Update README.md

    fn-ix authored Jan 22, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ed85e37 View commit details
Showing with 19 additions and 6 deletions.
  1. +9 −5 README.md
  2. +9 −1 main.cpp
  3. +1 −0 spek.svg
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# qt-spek
基于Qt的频谱分析器
<div>
<img align="right" src="spek.svg" width="54px" alt="logo"/>
<h2>Qt-Spek</h2>
</div>

修改于Spek[官网地址](http://spek.cc), [Github仓库地址](https://github.com/alexkay/spek)
- Added the ability to read files as command-line arguments (it previously looked at a single, static location).
- Will show a custom icon if one named `spek` exists according to the [Icon Theme Specification](https://www.freedesktop.org/wiki/Specifications/icon-theme-spec/) (e.g. `/usr/share/icons/hicolor/scalable/apps/spek.svg`).

![0](https://github.com/Greedysky/qt-spek/blob/master/demo.jpg?raw=true)
![1](https://github.com/Greedysky/qt-spek/blob/master/demo2.jpg?raw=true)
Build with `qmake -makefile && make`.

<img src="https://user-images.githubusercontent.com/16854594/150613717-a0f3faff-a4af-4931-9761-914bee1ce204.png" width="500"/>
10 changes: 9 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include <QApplication>
#include "spek-spectrogram.h"
#include <fstream>
#include <QIcon>
#include <QString>

int main(int argc, char *argv[])
{
@@ -8,7 +11,12 @@ int main(int argc, char *argv[])
SpekSpectrogram w;
w.show();

w.open("F:\\KuGou\\J.Fla - Shape Of You.mp3");
if(argc < 2) return 0 ;
std::ifstream file(argv[1]);
w.open(argv[1]);

w.setWindowIcon(QIcon::fromTheme("spek"));
w.setWindowTitle(QString("Qt-Spek"));

return a.exec();
}
1 change: 1 addition & 0 deletions spek.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.