Child: [0b1827] (diff)

Download this file

recollmain.ui.h    62 lines (46 with data), 1.5 kB

 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/
void RecollMain::fileExit()
{
exit(0);
}
void RecollMain::helpIndex()
{
}
void RecollMain::helpContents()
{
}
void RecollMain::helpAbout()
{
}
void RecollMain::resTextEdit_clicked( int par, int car )
{
fprintf(stderr, "Clicked at paragraph %d, char %d\n", par, car);
}
#include "qfontdialog.h"
#define BS 200000
void RecollMain::resTextEdit_returnPressed()
{
fprintf(stderr, "ReturnPressed()\n");
resTextEdit->setFont( QFontDialog::getFont( 0, resTextEdit->font() ) );
const char *fname = "utf8.txt";
FILE *fp = fopen(fname, "r");
if (fp) {
char buf[BS];
memset(buf,0, sizeof(buf));
int n = fread(buf, 1, BS-1, fp);
fclose(fp);
QString str = QString::fromUtf8(buf, n);
resTextEdit->setTextFormat(RichText);
resTextEdit->setText(str);
}
}