SeExpr
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 
void setExpressionString(const std::string &str)
Definition: ExprDialog.h:75
std::string getExpressionString()
Definition: ExprDialog.h:70
void show()
Definition: ExprDialog.cpp:156
int main(int argc, char *argv[])
Definition: EditMain.cpp:24