File: findGlobalDialog.cpp

package info (click to toggle)
texstudio 2.3%2Bdebian-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 20,992 kB
  • sloc: cpp: 61,734; ansic: 4,300; xml: 726; sh: 125; makefile: 25
file content (55 lines) | stat: -rw-r--r-- 1,237 bytes parent folder | download
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
#include "findGlobalDialog.h"
#include "ui_findGlobalDialog.h"

findGlobalDialog::findGlobalDialog(QWidget *parent) :
    QDialog(parent),
    m_ui(new Ui::findGlobalDialog)
{
    m_ui->setupUi(this);
}

findGlobalDialog::~findGlobalDialog()
{
    delete m_ui;
}

void findGlobalDialog::changeEvent(QEvent *e)
{
    QDialog::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        m_ui->retranslateUi(this);
        break;
    default:
        break;
    }
}

void findGlobalDialog::setSearchWord(QString word){
	m_ui->lineEditSearchWord->setText(word);
}

QString findGlobalDialog::getSearchWord(){
	return m_ui->lineEditSearchWord->text();
}

bool findGlobalDialog::isWords(){
	return m_ui->cbWords->isChecked();
}
bool findGlobalDialog::isCase(){
	return m_ui->cbCase->isChecked();
}
bool findGlobalDialog::isRegExp(){
	return m_ui->cbRegExp->isChecked();
}
int findGlobalDialog::getSearchScope(){
	return m_ui->comboBoxScope->currentIndex();
}

void findGlobalDialog::on_cbWords_toggled(bool state){
	if(state) m_ui->cbRegExp->setChecked(false);
}

void findGlobalDialog::on_cbRegExp_toggled(bool state){
	if(state) m_ui->cbWords->setChecked(false);
}