git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@228 b624d157-de02-0410-bad0-e51aec6abb33master
parent
a5d427d262
commit
699befe618
@ -0,0 +1,37 @@ |
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2008 by Felix Geyer * |
||||||
|
* * |
||||||
|
* This program is free software; you can redistribute it and/or modify * |
||||||
|
* it under the terms of the GNU General Public License as published by * |
||||||
|
* the Free Software Foundation; version 2 of the License. * |
||||||
|
* * |
||||||
|
* * |
||||||
|
* This program is distributed in the hope that it will be useful, * |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||||||
|
* GNU General Public License for more details. * |
||||||
|
* * |
||||||
|
* You should have received a copy of the GNU General Public License * |
||||||
|
* along with this program; if not, write to the * |
||||||
|
* Free Software Foundation, Inc., * |
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||||||
|
***************************************************************************/ |
||||||
|
|
||||||
|
#include "TargetWindowDlg.h" |
||||||
|
#include "AutoType.h" |
||||||
|
|
||||||
|
TargetWindowDlg::TargetWindowDlg(QWidget* parent) : QDialog(parent){ |
||||||
|
setupUi(this); |
||||||
|
QStringList windowTitles = AutoType::getAllWindowTitles(); |
||||||
|
windowTitles.sort(); |
||||||
|
for (QStringList::const_iterator i = windowTitles.constBegin(); i != windowTitles.constEnd(); ++i) |
||||||
|
comboWindow->addItem(*i); |
||||||
|
|
||||||
|
connect(buttonBox, SIGNAL(accepted()), SLOT(OnAccept())); |
||||||
|
connect(buttonBox, SIGNAL(rejected()), SLOT(reject())); |
||||||
|
} |
||||||
|
|
||||||
|
void TargetWindowDlg::OnAccept(){ |
||||||
|
pWindowTitle = comboWindow->itemText(comboWindow->currentIndex()); |
||||||
|
accept(); |
||||||
|
} |
@ -0,0 +1,40 @@ |
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2008 by Felix Geyer * |
||||||
|
* * |
||||||
|
* This program is free software; you can redistribute it and/or modify * |
||||||
|
* it under the terms of the GNU General Public License as published by * |
||||||
|
* the Free Software Foundation; version 2 of the License. * |
||||||
|
* * |
||||||
|
* * |
||||||
|
* This program is distributed in the hope that it will be useful, * |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||||||
|
* GNU General Public License for more details. * |
||||||
|
* * |
||||||
|
* You should have received a copy of the GNU General Public License * |
||||||
|
* along with this program; if not, write to the * |
||||||
|
* Free Software Foundation, Inc., * |
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||||||
|
***************************************************************************/ |
||||||
|
|
||||||
|
#ifndef TARGETWINDOWDLG_H |
||||||
|
#define TARGETWINDOWDLG_H |
||||||
|
|
||||||
|
#include "ui_TargetWindowDlg.h" |
||||||
|
|
||||||
|
class TargetWindowDlg : public QDialog, private Ui_TargetWindowDlg |
||||||
|
{ |
||||||
|
Q_OBJECT |
||||||
|
|
||||||
|
public: |
||||||
|
TargetWindowDlg(QWidget* parent); |
||||||
|
inline QString windowTitle() { return pWindowTitle; }; |
||||||
|
|
||||||
|
private slots: |
||||||
|
void OnAccept(); |
||||||
|
|
||||||
|
private: |
||||||
|
QString pWindowTitle; |
||||||
|
}; |
||||||
|
|
||||||
|
#endif // TARGETWINDOWDLG_H
|
@ -0,0 +1,42 @@ |
|||||||
|
<ui version="4.0" > |
||||||
|
<class>TargetWindowDlg</class> |
||||||
|
<widget class="QDialog" name="TargetWindowDlg" > |
||||||
|
<property name="geometry" > |
||||||
|
<rect> |
||||||
|
<x>0</x> |
||||||
|
<y>0</y> |
||||||
|
<width>574</width> |
||||||
|
<height>145</height> |
||||||
|
</rect> |
||||||
|
</property> |
||||||
|
<property name="windowTitle" > |
||||||
|
<string>Auto-Type: Select Target Window</string> |
||||||
|
</property> |
||||||
|
<layout class="QVBoxLayout" name="verticalLayout" > |
||||||
|
<item> |
||||||
|
<widget class="QLabel" name="label" > |
||||||
|
<property name="text" > |
||||||
|
<string>To specify the target window, either select an existing currently-opened window |
||||||
|
from the drop-down list, or enter the window title manually:</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item> |
||||||
|
<widget class="QComboBox" name="comboWindow" > |
||||||
|
<property name="editable" > |
||||||
|
<bool>true</bool> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item> |
||||||
|
<widget class="QDialogButtonBox" name="buttonBox" > |
||||||
|
<property name="standardButtons" > |
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
<resources/> |
||||||
|
<connections/> |
||||||
|
</ui> |
Reference in new issue