SeExpr
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ui
ExprMain.cpp
Go to the documentation of this file.
1
/*
2
* Copyright Disney Enterprises, Inc. All rights reserved.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License
6
* and the following modification to it: Section 6 Trademarks.
7
* deleted and replaced with:
8
*
9
* 6. Trademarks. This License does not grant permission to use the
10
* trade names, trademarks, service marks, or product names of the
11
* Licensor and its affiliates, except as required for reproducing
12
* the content of the NOTICE file.
13
*
14
* You may obtain a copy of the License at
15
* http://www.apache.org/licenses/LICENSE-2.0
16
*/
17
18
#include <iostream>
19
#include <string>
20
21
#include <QtGui/QApplication>
22
#include "
ExprDialog.h
"
23
24
int
main
(
int
argc,
char
*argv[])
25
{
26
QApplication app(argc, argv);
27
ExprDialog
dialog(0);
28
dialog.setWindowTitle(
"Expression Editor 2"
);
29
dialog.
show
();
30
31
if
(argc < 2 || std::string(argv[1]) !=
"-automatedTest"
) {
32
if
(dialog.
exec
() == QDialog::Accepted)
33
std::cerr <<
"returned expression: "
<< dialog.
getExpressionString
() << std::endl;
34
}
else
{
35
std::string str =
"$u + $v"
;
36
dialog.
setExpressionString
(str);
37
if
(dialog.
getExpressionString
() != str ) {
38
std::cerr <<
"test failed: "
<< dialog.
getExpressionString
() <<
" != "
<< str << std::endl;
39
return
1;
40
}
41
}
42
43
return
0;
44
}
45
ExprDialog
Definition:
ExprDialog.h:45
ExprDialog::setExpressionString
void setExpressionString(const std::string &str)
Definition:
ExprDialog.h:75
ExprDialog::getExpressionString
std::string getExpressionString()
Definition:
ExprDialog.h:70
ExprDialog::show
void show()
Definition:
ExprDialog.cpp:156
ExprDialog.h
ExprDialog::exec
int exec()
Definition:
ExprDialog.cpp:164
main
int main(int argc, char *argv[])
Definition:
EditMain.cpp:24
Generated by
1.8.5