File: testswapscreen.h

package info (click to toggle)
dspdfviewer 1.15.1%2Bgit20230427.d432d8d-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 924 kB
  • sloc: cpp: 2,303; makefile: 22; sh: 7
file content (31 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

#include "dspdfviewer.h"

/** Test driver
 *
 * If it detects two screens, it will verify that the windows switch to the
 * specified positions.
 * If running on single-screen, the commands will be executed without verification,
 * just to make sure the code doesn't segfault or similar.
 *
 * Rinse and repeat 3 times.
 *
 */
class SwapScreensAndCheckAlign: public QObject {
	Q_OBJECT

	DSPDFViewer& dspdfviewer;
	QRect screenPrimary;
	QRect screenSecondary;
	bool verify;
public:
	SwapScreensAndCheckAlign(DSPDFViewer& app);
signals:
	void screenSwapRequested();
	void quitRequested();
public slots:
	void checkStartPositions();
	void checkAfterFirstSwap();
	void checkAfterSwapBack();
};