Skip to content
This repository was archived by the owner on Aug 23, 2021. It is now read-only.

Commit 5d528b2

Browse files
committed
4.0
4.1 soon as I haven't implemented multi monitor support yet
1 parent cc2562f commit 5d528b2

File tree

12 files changed

+71
-9
lines changed

12 files changed

+71
-9
lines changed

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kshare.arsenarsen.com

docs/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# **KShare**
2+
## The open source and cross platform screen sharing software
3+
###### Inspired by [ShareX](https://getsharex.com)
4+
5+
KShare is a screenshotting utility built using Qt and written in C++.
6+
It has many features, including:
7+
* Area capture,
8+
* Fullscreen capture,
9+
* Active window capture,
10+
* Magnifier, to make those aligments,
11+
* Drawing on screenshots (blur, shapes, text, ...),
12+
* Recording,
13+
* Highly customizable video codecs,
14+
* Automatic upload/clipboard copying,
15+
* Hotkeys,
16+
* Color picker, and last but not least,
17+
* Custom upload destinations
18+
19+
## Enough talking, show us how it looks
20+
The main window is rather simple, with only a log, and a button in it:
21+
![image1](http://i.imgur.com/QOebwEM.png)
22+
23+
The settings have quite a bit more going on:
24+
![image2](http://i.imgur.com/kZzQzGr.png)
25+
26+
The area selection editor is simple:
27+
![image3](http://i.imgur.com/kyWZk3p.jpg)
28+
29+
And the color picker is the simplest thing ever:
30+
![image4](http://i.imgur.com/VIeGbdQ.jpg)
31+
32+
The way you select the area to record is by resizing this simple widget:
33+
![image5](http://i.imgur.com/0iXFHnm.png)
34+
35+
And when you start recording there is a simple preview shown:
36+
![image6](http://i.imgur.com/6fu33TR.png)
37+
38+
## Download
39+
Currently, the only good download I provide is for Arch Linux and Ubuntu 17.04
40+
The Arch download is on the AUR as `kshare` and `kshare-git`,
41+
and the Ubuntu build is a .deb found on my CI: [kshare.deb](https://nativeci.arsenarsen.com/job/KShare/73/artifact/packages/simpleName.deb)
42+
43+
## Wait.. how do I actually use this?
44+
45+
Here is the wiki: [`ding`](https://github.com/ArsenArsen/KShare/wiki)

docs/_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-minimal

main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
6565
a.setQuitOnLastWindowClosed(false);
6666
a.setApplicationName("KShare");
6767
a.setOrganizationName("ArsenArsen");
68-
a.setApplicationVersion("3.0");
68+
a.setApplicationVersion("4.0");
6969

7070
QCommandLineParser parser;
7171
parser.addHelpOption();

mainwindow.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,18 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
4646
QAction *quit = new QAction("Quit", this);
4747
QAction *shtoggle = new QAction("Show/Hide", this);
4848
QAction *fullscreen = new QAction("Take fullscreen shot", this);
49+
QAction *area = new QAction("Take area shot", this);
4950

50-
QAction *active = new QAction("Take area shot", this);
5151
#ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW
52-
QAction *area = new QAction("Screenshot active window", this);
52+
QAction *active = new QAction("Screenshot active window", this);
5353
connect(active, &QAction::triggered, this, [] { screenshotter::activeDelayed(); });
5454
#endif
5555
QAction *picker = new QAction("Show color picker", this);
5656
QAction *rec = new QAction("Record screen", this);
5757
QAction *recoff = new QAction("Stop recording", this);
5858
menu->addActions({ quit, shtoggle, picker });
5959
menu->addSeparator();
60-
menu->addActions({ fullscreen, area });
60+
menu->addActions({ fullscreen, area, active });
6161
#ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW
6262
menu->addAction(area);
6363
#endif
@@ -159,3 +159,7 @@ void MainWindow::on_actionAbout_triggered() {
159159
box->setAttribute(Qt::WA_DeleteOnClose);
160160
box->show();
161161
}
162+
163+
void MainWindow::on_actionActive_window_triggered() {
164+
screenshotter::activeDelayed();
165+
}

mainwindow.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ private slots:
2929
void on_actionColor_Picker_triggered();
3030
void on_actionAbout_triggered();
3131

32+
void on_actionActive_window_triggered();
33+
3234
public:
3335
static MainWindow *inst();
3436
explicit MainWindow(QWidget *parent = 0);

mainwindow.ui

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
</property>
7171
<addaction name="actionFullscreen"/>
7272
<addaction name="actionArea"/>
73+
<addaction name="actionActive_window"/>
7374
</widget>
7475
<widget class="QMenu" name="menuUtilities">
7576
<property name="title">
@@ -130,6 +131,11 @@
130131
<string>About</string>
131132
</property>
132133
</action>
134+
<action name="actionActive_window">
135+
<property name="text">
136+
<string>Active window</string>
137+
</property>
138+
</action>
133139
</widget>
134140
<layoutdefault spacing="6" margin="11"/>
135141
<resources/>

platformspecifics/u32/u32backend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ DWORD PlatformBackend::pid() {
2626
}
2727

2828
WId PlatformBackend::getActiveWID() {
29-
return GetForegroundWindow();
29+
return (WId)GetForegroundWindow();
3030
}

recording/encoders/encoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Encoder::Encoder(QString &targetFile, QSize res, CodecSettings *settings) {
5353
if (out->enc->codec_id == AV_CODEC_ID_GIF)
5454
out->enc->pix_fmt = AV_PIX_FMT_RGB8;
5555
else if (out->enc->codec_id == AV_CODEC_ID_H264 || out->enc->codec_id == AV_CODEC_ID_H265) {
56-
av_dict_set(&dict, "preset", settings->h264Profile.toLocal8Bit().constData(), 0);
56+
av_dict_set(&dict, "preset", settings ? settings->h264Profile.toLocal8Bit().constData() : "medium", 0);
5757
av_dict_set_int(&dict, "crf", OR_DEF(settings, h264Crf, 12), 0);
5858
} else if (out->enc->codec_id == AV_CODEC_ID_VP8 || out->enc->codec_id == AV_CODEC_ID_VP9)
5959
av_dict_set_int(&dict, "lossless", OR_DEF(settings, vp9Lossless, false), 0);

recording/encoders/encodersettingsdialog.ui

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484
<property name="currentText">
8585
<string notr="true">medium</string>
8686
</property>
87+
<property name="currentIndex">
88+
<number>5</number>
89+
</property>
8790
<item>
8891
<property name="text">
8992
<string>ultrafast</string>

0 commit comments

Comments
 (0)