Ground-Truthing GUI  1.0
fileexistswindow.h
1 
23 #ifndef FILEEXISTSWINDOW
24 #define FILEEXISTSWINDOW
25 
26 #include <QWidget>
27 #include <QObject>
28 #include <QLabel>
29 #include <QVBoxLayout>
30 #include <QPushButton>
31 
32 class FileExistsWindow:public QWidget{
33  Q_OBJECT
34 
35 private:
36 
37  // Create a push button
38  QPushButton* push;
39 
40  // Create a horizontal layout containing the push button
41  QHBoxLayout *push_layout;
42 
43  // Create a vertical layout
44  QVBoxLayout* layout;
45 
46  // Create the label which is going to display the
47  QLabel *text;
48 
49 
50 public:
51 
55 
56  text=new QLabel(this);
57  text->setText("A text file is already associated to the image."
58  "If you press the save button, you will overwrite it.");
59 
60  push=new QPushButton(this);
61  push->setText("Proceed");
62 
63  layout=new QVBoxLayout(this);
64  push_layout=new QHBoxLayout();
65 
66  push_layout->addWidget(push);
67 
68  layout->addWidget(text);
69  layout->addLayout(push_layout);
70 
71  this->setWindowTitle("Warning: A text file already exists.");
72  QObject::connect(push,SIGNAL(clicked()),this,SLOT(quit()));
73  this->show();
74 
75  }
76 
77 private slots:
78 
82  void quit();
83 };
84 
85 #endif // FILEEXISTSWINDOW
86 
FileExistsWindow()
The constructor of the FileExistsWindow.
Definition: fileexistswindow.h:54
Warning window.
Definition: fileexistswindow.h:32