Fixed problem with images included in branches. Added missing adaptormodel.* files
5 #include "findwindow.h"
8 extern QString vymName;
10 FindWindow::FindWindow(QWidget* parent)
11 : QGroupBox( tr("Find"), parent )
14 setWindowTitle(vymName + " - " +tr("Find Text"));
16 QVBoxLayout* mainLayout = new QVBoxLayout;
18 QHBoxLayout *row1Layout = new QHBoxLayout;
20 QLabel* label = new QLabel;
21 label->setText( tr("Text to find:"));
22 row1Layout->addWidget( label );
25 // Create LineEdit (here QComboBox)
26 QHBoxLayout *row2Layout = new QHBoxLayout;
27 findcombo = new QComboBox;
28 findcombo->setMinimumWidth(150);
29 findcombo->setEditable(true);
30 connect ( findcombo, SIGNAL( highlighted(int) ),
31 this, SLOT( findPressed() ) );
32 connect ( findcombo, SIGNAL( textChanged(const QString &) ),
33 this, SLOT( findTextChanged(const QString&) ) );
35 row2Layout->addWidget(findcombo);
38 QHBoxLayout *row3Layout = new QHBoxLayout;
39 clearbutton = new QPushButton;
40 clearbutton->setText(tr("Clear"));
41 connect ( clearbutton, SIGNAL( clicked() ), this, SLOT( clearLineEdit() ) );
42 row3Layout->addWidget (clearbutton);
44 cancelbutton = new QPushButton;
45 cancelbutton->setText(tr("Cancel"));
46 cancelbutton->setShortcut (Qt::Key_Escape);
47 connect ( cancelbutton, SIGNAL( clicked() ), this, SLOT( cancelPressed() ) );
48 row3Layout->addWidget (cancelbutton);
50 findbutton = new QPushButton;
51 findbutton->setText (tr("Find"));
52 findbutton->setDefault (true);
53 findbutton->setShortcut (Qt::Key_Return);
54 connect ( findbutton, SIGNAL( clicked() ), this, SLOT( findPressed() ) );
56 row3Layout->addStretch(2);
57 row3Layout->addWidget(findbutton);
59 mainLayout->addLayout (row1Layout);
60 mainLayout->addLayout (row2Layout);
61 mainLayout->addLayout (row3Layout);
62 setLayout (mainLayout);
65 void FindWindow::popup()
68 findcombo->lineEdit()->selectAll();
69 findcombo->setFocus();
72 void FindWindow::cancelPressed()
77 void FindWindow::findPressed()
79 emit (findButton(findcombo->currentText() ) );
82 void FindWindow::findTextChanged(const QString&)
84 emit (somethingChanged() );
87 void FindWindow::clearLineEdit()
89 findcombo->lineEdit()->clear();