summaryrefslogtreecommitdiffstats
path: root/kbugbuster/gui/cwsearchwidget.cpp
blob: c51b7ea0f88e2c263289a0cf6fdcdb9e5e9ab1ed (plain)
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
/*
    cwsearchwidget.cpp  -  Search Pane

    copyright   : (c) 2001 by Martijn Klingens
    email       : klingens@kde.org

    *************************************************************************
    *                                                                       *
    * 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; either version 2 of the License, or     *
    * (at your option) any later version.                                   *
    *                                                                       *
    *************************************************************************
*/

#include <tqpushbutton.h>
#include <klocale.h>
#include <kdialog.h>
#include <tqlineedit.h>
#include <tqlayout.h>
#include <kcombobox.h>
#include <tqlabel.h>

#include "cwsearchwidget.h"

using namespace KBugBusterMainWindow;

CWSearchWidget::CWSearchWidget( TQWidget *parent , const char * name )
: CWSearchWidget_Base( parent, name )
{
    // Set fonts and margins
    CWSearchWidget_BaseLayout->setSpacing( KDialog::spacingHint() );
    CWSearchWidget_BaseLayout->setMargin( KDialog::marginHint() );

    TQFont f = m_searchLabel->font();
    f.setBold( true );
    m_searchLabel->setFont( f );

    connect( m_searchDesc, TQT_SIGNAL( textChanged ( const TQString & ) ),
             this, TQT_SLOT( textDescriptionChanged ( const TQString & ) ) );

    connect( m_searchBugNumber, TQT_SIGNAL( textChanged ( const TQString & ) ),
             this, TQT_SLOT( textNumberChanged ( const TQString & ) ) );
             
    m_searchDescBtn->setEnabled( !m_searchDesc->text().isEmpty() );
    m_searchBugNumberBtn->setEnabled( !m_searchBugNumber->text().isEmpty() );

//    m_searchPackages->setCompletionMode( TDEGlobalSettings::CompletionAuto );
}

CWSearchWidget::~CWSearchWidget()
{
}

void CWSearchWidget::textDescriptionChanged ( const TQString &_text )
{
    m_searchDescBtn->setEnabled( !_text.isEmpty() );
}

void CWSearchWidget::textNumberChanged ( const TQString &_text )
{
    m_searchBugNumberBtn->setEnabled( !_text.isEmpty() );
}

#include "cwsearchwidget.moc"

/* vim: set et ts=4 sw=4 softtabstop=4: */