4.0
4.1 soon as I haven't implemented multi monitor support yet
This commit is contained in:
parent
cc2562f492
commit
5d528b2435
1
docs/CNAME
Normal file
1
docs/CNAME
Normal file
@ -0,0 +1 @@
|
||||
kshare.arsenarsen.com
|
45
docs/README.md
Normal file
45
docs/README.md
Normal file
@ -0,0 +1,45 @@
|
||||
# **KShare**
|
||||
## The open source and cross platform screen sharing software
|
||||
###### Inspired by [ShareX](https://getsharex.com)
|
||||
|
||||
KShare is a screenshotting utility built using Qt and written in C++.
|
||||
It has many features, including:
|
||||
* Area capture,
|
||||
* Fullscreen capture,
|
||||
* Active window capture,
|
||||
* Magnifier, to make those aligments,
|
||||
* Drawing on screenshots (blur, shapes, text, ...),
|
||||
* Recording,
|
||||
* Highly customizable video codecs,
|
||||
* Automatic upload/clipboard copying,
|
||||
* Hotkeys,
|
||||
* Color picker, and last but not least,
|
||||
* Custom upload destinations
|
||||
|
||||
## Enough talking, show us how it looks
|
||||
The main window is rather simple, with only a log, and a button in it:
|
||||
![image1](http://i.imgur.com/QOebwEM.png)
|
||||
|
||||
The settings have quite a bit more going on:
|
||||
![image2](http://i.imgur.com/kZzQzGr.png)
|
||||
|
||||
The area selection editor is simple:
|
||||
![image3](http://i.imgur.com/kyWZk3p.jpg)
|
||||
|
||||
And the color picker is the simplest thing ever:
|
||||
![image4](http://i.imgur.com/VIeGbdQ.jpg)
|
||||
|
||||
The way you select the area to record is by resizing this simple widget:
|
||||
![image5](http://i.imgur.com/0iXFHnm.png)
|
||||
|
||||
And when you start recording there is a simple preview shown:
|
||||
![image6](http://i.imgur.com/6fu33TR.png)
|
||||
|
||||
## Download
|
||||
Currently, the only good download I provide is for Arch Linux and Ubuntu 17.04
|
||||
The Arch download is on the AUR as `kshare` and `kshare-git`,
|
||||
and the Ubuntu build is a .deb found on my CI: [kshare.deb](https://nativeci.arsenarsen.com/job/KShare/73/artifact/packages/simpleName.deb)
|
||||
|
||||
## Wait.. how do I actually use this?
|
||||
|
||||
Here is the wiki: [`ding`](https://github.com/ArsenArsen/KShare/wiki)
|
1
docs/_config.yml
Normal file
1
docs/_config.yml
Normal file
@ -0,0 +1 @@
|
||||
theme: jekyll-theme-minimal
|
2
main.cpp
2
main.cpp
@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
a.setApplicationName("KShare");
|
||||
a.setOrganizationName("ArsenArsen");
|
||||
a.setApplicationVersion("3.0");
|
||||
a.setApplicationVersion("4.0");
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.addHelpOption();
|
||||
|
@ -46,10 +46,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
QAction *quit = new QAction("Quit", this);
|
||||
QAction *shtoggle = new QAction("Show/Hide", this);
|
||||
QAction *fullscreen = new QAction("Take fullscreen shot", this);
|
||||
QAction *area = new QAction("Take area shot", this);
|
||||
|
||||
QAction *active = new QAction("Take area shot", this);
|
||||
#ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW
|
||||
QAction *area = new QAction("Screenshot active window", this);
|
||||
QAction *active = new QAction("Screenshot active window", this);
|
||||
connect(active, &QAction::triggered, this, [] { screenshotter::activeDelayed(); });
|
||||
#endif
|
||||
QAction *picker = new QAction("Show color picker", this);
|
||||
@ -57,7 +57,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
QAction *recoff = new QAction("Stop recording", this);
|
||||
menu->addActions({ quit, shtoggle, picker });
|
||||
menu->addSeparator();
|
||||
menu->addActions({ fullscreen, area });
|
||||
menu->addActions({ fullscreen, area, active });
|
||||
#ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW
|
||||
menu->addAction(area);
|
||||
#endif
|
||||
@ -159,3 +159,7 @@ void MainWindow::on_actionAbout_triggered() {
|
||||
box->setAttribute(Qt::WA_DeleteOnClose);
|
||||
box->show();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionActive_window_triggered() {
|
||||
screenshotter::activeDelayed();
|
||||
}
|
||||
|
@ -29,6 +29,8 @@ private slots:
|
||||
void on_actionColor_Picker_triggered();
|
||||
void on_actionAbout_triggered();
|
||||
|
||||
void on_actionActive_window_triggered();
|
||||
|
||||
public:
|
||||
static MainWindow *inst();
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
|
@ -70,6 +70,7 @@
|
||||
</property>
|
||||
<addaction name="actionFullscreen"/>
|
||||
<addaction name="actionArea"/>
|
||||
<addaction name="actionActive_window"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuUtilities">
|
||||
<property name="title">
|
||||
@ -130,6 +131,11 @@
|
||||
<string>About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionActive_window">
|
||||
<property name="text">
|
||||
<string>Active window</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
|
@ -26,5 +26,5 @@ DWORD PlatformBackend::pid() {
|
||||
}
|
||||
|
||||
WId PlatformBackend::getActiveWID() {
|
||||
return GetForegroundWindow();
|
||||
return (WId)GetForegroundWindow();
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ Encoder::Encoder(QString &targetFile, QSize res, CodecSettings *settings) {
|
||||
if (out->enc->codec_id == AV_CODEC_ID_GIF)
|
||||
out->enc->pix_fmt = AV_PIX_FMT_RGB8;
|
||||
else if (out->enc->codec_id == AV_CODEC_ID_H264 || out->enc->codec_id == AV_CODEC_ID_H265) {
|
||||
av_dict_set(&dict, "preset", settings->h264Profile.toLocal8Bit().constData(), 0);
|
||||
av_dict_set(&dict, "preset", settings ? settings->h264Profile.toLocal8Bit().constData() : "medium", 0);
|
||||
av_dict_set_int(&dict, "crf", OR_DEF(settings, h264Crf, 12), 0);
|
||||
} else if (out->enc->codec_id == AV_CODEC_ID_VP8 || out->enc->codec_id == AV_CODEC_ID_VP9)
|
||||
av_dict_set_int(&dict, "lossless", OR_DEF(settings, vp9Lossless, false), 0);
|
||||
|
@ -84,6 +84,9 @@
|
||||
<property name="currentText">
|
||||
<string notr="true">medium</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ultrafast</string>
|
||||
|
@ -29,7 +29,7 @@ void screenshotter::fullscreenDelayed() {
|
||||
}
|
||||
|
||||
void screenshotter::activeDelayed() {
|
||||
QTimer::singleShot(settings::settings().value("delay", 0.5).toFloat() * 1000, &screenshotter::activeDelayed);
|
||||
QTimer::singleShot(settings::settings().value("delay", 0.5).toFloat() * 1000, &screenshotter::active);
|
||||
}
|
||||
|
||||
void screenshotter::active() {
|
||||
|
@ -88,7 +88,7 @@
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="nameScheme">
|
||||
<property name="toolTip">
|
||||
<string>http://doc.qt.io/qt-5/qdatetime.html#toString</string>
|
||||
<string>%(date format)date and %ext are supported</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Screenshot %(yyyy-MM-dd HH:mm:ss)date.%ext</string>
|
||||
@ -126,7 +126,7 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Uploader selection:</string>
|
||||
<string>Destination:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user