关于Flameshot的介绍请参见《Linux下的截图工具 —— Flameshot》,地址如下:
Linux下的截图工具 —— Flameshot_蓝天居士的博客-CSDN博客
本系列文章分析Flameshot的源码。
下载并解压flameshot-master.zip源码包之后,源码目录内容如下:
其中各个子目录内容如下:
- cmake文件夹
$ ls cmake/
Cache.cmake CompilerWarnings.cmake modules Sanitizers.cmake StandardProjectSettings.cmake StaticAnalyzers.cmake
$ ls cmake/modules/
MacOSXBundleInfo.plist.in
- data文件夹
$ ls data
appdata dbus desktopEntry flameshot.rc graphics.qrc img man shell-completion snap translations
$ ls data/appdata/
org.flameshot.Flameshot.metainfo.xml
$ ls data/dbus/
org.flameshot.Flameshot.service.in org.flameshot.Flameshot.xml org.freedesktop.Notifications.xml
$ ls data/desktopEntry/
package
$ ls data/img/
app hicolor material preview
$ ls data/man/
man1
$ ls data/shell-completion/
flameshot.bash flameshot.fish flameshot.zsh
$ ls data/snap/
snapcraft.yaml
$ ls data/translations/
Internationalization_bg.ts Internationalization_eu.ts Internationalization_hu.ts Internationalization_nl_NL.ts Internationalization_sv_SE.ts Internationalization_zh_HK.ts
Internationalization_ca.ts Internationalization_fa.ts Internationalization_id.ts Internationalization_nl.ts Internationalization_sw.ts Internationalization_zh_TW.ts
Internationalization_cs.ts Internationalization_fi.ts Internationalization_it_IT.ts Internationalization_pl.ts Internationalization_ta.ts
Internationalization_da.ts Internationalization_fr.ts Internationalization_ja.ts Internationalization_pt_BR.ts Internationalization_tr.ts
Internationalization_de_DE.ts Internationalization_gl.ts Internationalization_ka.ts Internationalization_ru.ts Internationalization_uk.ts
Internationalization_el.ts Internationalization_grc.ts Internationalization_ko.ts Internationalization_sk.ts Internationalization_vi.ts
Internationalization_es.ts Internationalization_he.ts Internationalization_nb_NO.ts Internationalization_sr_SP.ts Internationalization_zh_CN.ts
- docs文件夹
- external文件夹
$ ls external/
QHotkey Qt-Color-Widgets singleapplication
$ ls external/QHotkey/
CMakeLists.txt LICENSE QHotkey qhotkey.cpp qhotkey.h qhotkey_mac.cpp qhotkey_p.h qhotkey_win.cpp qhotkey_x11.cpp README.md
$ ls external/Qt-Color-Widgets/
cmake color_widgets_designer_plugin color_widgets.pro Doxyfile.in GITSHA LICENSE-EXCEPTION README.md resources
CMakeLists.txt color_widgets.pri COPYING gallery include QtColorWidgets.pc.in refactor.sh src
$ ls external/singleapplication/
CHANGELOG.md examples README.md singleapplication.cpp singleapplication_p.cpp singleapplication.pri
CMakeLists.txt LICENSE SingleApplication singleapplication.h singleapplication_p.h Windows.md
- packaging文件夹
$ ls packaging/
debian flatpak macos rpm win-installer
$ ls packaging/debian/
changelog compat control copyright docs rules source
$ ls packaging/flatpak/
org.flameshot.Flameshot.yml
$ ls packaging/macos/
create_keychain.sh flameshot.icns Info.plist sign_qtapp.sh update_package.sh
$ ls packaging/rpm/
flameshot.spec
$ ls packaging/win-installer/
Bitmaps LICENSE
- scripts文件夹
$ ls scripts/
upload_services
$ ls scripts/upload_services/
0x0.st.sh file.io.sh transferwee.py wetransfer.com.sh
- src文件夹
$ ls src/
cli CMakeLists.txt config core main.cpp tools utils widgets
$ ls src/cli/
CMakeLists.txt commandargument.cpp commandargument.h commandlineparser.cpp commandlineparser.h commandoption.cpp commandoption.h
$ ls src/config/
buttonlistview.cpp clickablelabel.h colorpickereditor.h configwindow.cpp filenameeditor.h shortcutswidget.cpp styleoverride.h
buttonlistview.h CMakeLists.txt configerrordetails.cpp configwindow.h generalconf.cpp shortcutswidget.h uicoloreditor.cpp
cacheutils.cpp colorpickereditmode.cpp configerrordetails.h extendedslider.cpp generalconf.h strftimechooserwidget.cpp uicoloreditor.h
cacheutils.h colorpickereditmode.h configresolver.cpp extendedslider.h setshortcutwidget.cpp strftimechooserwidget.h visualseditor.cpp
clickablelabel.cpp colorpickereditor.cpp configresolver.h filenameeditor.cpp setshortcutwidget.h styleoverride.cpp visualseditor.h
$ ls src/core/
capturerequest.cpp CMakeLists.txt flameshotdaemon.cpp flameshotdbusadapter.cpp flameshot.h globalshortcutfilter.h qguiappcurrentscreen.h
capturerequest.h flameshot.cpp flameshotdaemon.h flameshotdbusadapter.h globalshortcutfilter.cpp qguiappcurrentscreen.cpp
$ ls src/tools/
abstractactiontool.cpp abstractpathtool.h accept capturecontext.h circlecount exit launcher move pixelate save sizeincrease toolfactory.h
abstractactiontool.h abstracttwopointtool.cpp arrow capturetool.h CMakeLists.txt imgupload line pencil rectangle selection text undo
abstractpathtool.cpp abstracttwopointtool.h capturecontext.cpp circle copy invert marker pin redo sizedecrease toolfactory.cpp
$ ls src/utils/
abstractlogger.cpp colorutils.h desktopfileparse.h filenamehandler.h history.h request.h screenshotsaver.h systemnotification.h waylandutils.h
abstractlogger.h confighandler.cpp desktopinfo.cpp globalvalues.cpp pathinfo.cpp screengrabber.cpp strfparse.cpp valuehandler.cpp winlnkfileparse.cpp
CMakeLists.txt confighandler.h desktopinfo.h globalvalues.h pathinfo.h screengrabber.h strfparse.h valuehandler.h winlnkfileparse.h
colorutils.cpp desktopfileparse.cpp filenamehandler.cpp history.cpp request.cpp screenshotsaver.cpp systemnotification.cpp waylandutils.cpp
$ ls src/widgets/
capture colorpickerwidget.cpp imagelabel.h infowindow.ui orientablepushbutton.cpp updatenotificationwidget.cpp uploadlineitem.cpp
capturelauncher.cpp colorpickerwidget.h imguploaddialog.cpp loadspinner.cpp orientablepushbutton.h updatenotificationwidget.h uploadlineitem.h
capturelauncher.h draggablewidgetmaker.cpp imguploaddialog.h loadspinner.h panel uploadhistory.cpp uploadlineitem.ui
capturelauncher.ui draggablewidgetmaker.h infowindow.cpp notificationwidget.cpp trayicon.cpp uploadhistory.h
CMakeLists.txt imagelabel.cpp infowindow.h notificationwidget.h trayicon.h uploadhistory.ui
- tests文件夹
$ ls tests/
action_options.sh path_option.sh
本文介绍了Flameshot源码包的概况,包括源码根目录下的内容以及各个子文件夹中的内容。从下一篇文章开始,将针对于实际的源码进行分析。