27 #include <QtGui/QVBoxLayout>
28 #include <QtGui/QHBoxLayout>
29 #include <QtGui/QLabel>
41 QVBoxLayout * placement =
new QVBoxLayout (
this ) ;
42 placement -> setContentsMargins ( 20, 20, 20, 20 );
43 placement -> setSpacing ( 5 );
45 QWidget * widhaut =
new QWidget (
this ) ;
46 QHBoxLayout * haut =
new QHBoxLayout ( widhaut ) ;
47 FMax =
new QLabel (
"Nombre max" , widhaut ) ;
49 FNombre =
new QSpinBox ( widhaut ) ;
50 FNombre -> setMinimum ( 0 );
51 FNombre -> setMaximum ( 999 );
52 FNombre ->setAccelerated(
true);
54 haut -> addWidget ( FMax ) ;
55 haut -> addWidget ( FNombre ) ;
56 FFichiers =
new QCheckBox (
"Fichiers" ,
this ) ;
57 FFichiers -> setChecked ( parent -> getControler() -> getUndoOnFile() ) ;
58 placement -> addWidget ( widhaut ) ;
59 placement -> addWidget ( FFichiers ) ;
60 setWindowTitle (
"Undo / Redo" ) ;
63 FNombre -> setValue ( 100 ) ;
66 QObject :: connect ( FNombre , SIGNAL ( valueChanged (
int ) ) ,
this ,
67 SLOT ( callbackNbUndos ( ) ) ) ;
68 QObject :: connect ( FFichiers , SIGNAL ( clicked ( ) ) ,
this ,
69 SLOT ( callbackToggleOnFile ( ) ) ) ;
71 FClose =
new QPushButton (
"fermer" ,
this ) ;
72 placement -> addWidget ( FClose ) ;
73 FClose -> setFocus ( ) ;
74 QObject :: connect ( FClose ,
75 SIGNAL ( clicked ( ) ) ,
77 SLOT ( close ( ) ) ) ;
93 void DialogDo :: callbackToggleOnFile ( )
95 FParent -> getControler ( ) -> setUndoOnFile ( FFichiers -> isChecked ( ) ) ;
97 void DialogDo :: callbackNbUndos ( )
99 FParent -> getControler ( ) -> setNbMaxUndos ( FNombre -> value ( ) ) ;