1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
/*********
*
* This file is part of BibleTime's source code, http://www.bibletime.info/.
*
* Copyright 1999-2006 by the BibleTime developers.
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
*
**********/
#include "crefselectdialog.h"
// QT
#include "tqlayout.h"
#include "tqlineedit.h"
#include "tqlabel.h"
// backend
#include "backend/cswordkey.h"
#include "backend/cswordversekey.h"
//KDE includes
#include <klocale.h>
//CRefSelectDialog::CRefSelectDialog(TQWidget *tqparent)
// : KDialogBase(tqparent, "Refenences",
// true, i18n("Refenence selector"),
// KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true),
// m_oldPos(0,0)
//
//{
// m_page = new TQWidget( this );
// m_placeholder = new TQWidget( m_page);
// TQVBoxLayout* tqlayout = new TQVBoxLayout( m_page, 0, spacingHint());
// m_lineedit = new TQLineEdit( TQString(), m_page, "select" );
// m_lineedit->setMinimumWidth(fontMetrics().maxWidth()*8);
//
// TQHBoxLayout* htqlayout = new TQHBoxLayout(m_page, 0, spacingHint());
// htqlayout->addWidget(new TQLabel(i18n("Verse key:"), m_page));
// htqlayout->addWidget(m_lineedit);
// tqlayout->addItem(htqlayout);
// tqlayout->addWidget(m_placeholder);
//
// m_chooser = NULL;
// m_oldParent = NULL;
// setMainWidget(m_page);
//
// connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(slotPressedOk()));
// connect(this, TQT_SIGNAL(cancelClicked()), TQT_SLOT(slotPressedCancel()));
//}
//
//CRefSelectDialog::~CRefSelectDialog() {
//}
//
//
//void CRefSelectDialog::setChooser(CKeyChooser* const chooser) {
// if (chooser && chooser != m_chooser) {
// if (m_chooser) restoreParent();
//
// m_chooser = chooser;
//
// // store old owner and position
// m_oldParent = chooser->tqparentWidget(false);
// m_oldPos = chooser->pos();
//
// // we temporary borrow chooser widget from the MDI window
// m_placeholder->setMinimumSize(chooser->size());
// chooser->reparent(m_placeholder, TQPoint(0,0), true);
// }
//}
//
//void CRefSelectDialog::slotPressedOk() {
// // go to proper key
// CSwordKey* key = m_chooser->key();
// key->key(m_lineedit->text());
// m_chooser->setKey(key);
//
// // restore tqparent of stolen widget
// restoreParent();
//}
//
//void CRefSelectDialog::slotPressedCancel() {
// // restore tqparent of stolen widget
// restoreParent();
//}
//
//void CRefSelectDialog::restoreParent() {
// if (m_chooser && m_oldParent) {
// m_chooser->reparent(m_oldParent, m_oldPos, true);
// }
// m_chooser = NULL;
//}
|