/****************************************************************************
** Form implementation generated from reading ui file 'searchdialogbase.ui'
**
** Created: 수  6월 13 18:36:25 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.7   edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "searchdialogbase.h"

#include <qvariant.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

static const char* const image0_data[] = { 
"10 55 110 2",
"#R c #dcdcdc",
"#N c #dddddd",
"#M c #dddddf",
"#O c #dddfdd",
"#Q c #dddfdf",
"#P c #dfdddd",
"#I c #dfdfdf",
"#J c #dfdfe0",
"#H c #dfe0e0",
"#G c #e0dfe0",
"#F c #e0e0e0",
"#E c #e0e0e2",
"#D c #e0e2e2",
"#C c #e0e2e3",
"#K c #e2dfdf",
"#A c #e2e0e2",
"#z c #e2e0e3",
"#L c #e2e2df",
"#t c #e2e2e2",
"#u c #e2e2e3",
"#v c #e2e3e3",
"#w c #e2e5e5",
"#B c #e3e0e3",
"#y c #e3e2e2",
"#x c #e3e2e3",
"#q c #e3e3e3",
"#s c #e3e3e6",
"#r c #e3e6e3",
"#o c #e3e6e6",
"#k c #e5e6e6",
"#p c #e6e3e6",
"#n c #e6e6e6",
"#m c #e6e9e9",
"#f c #e8e8e9",
"#h c #e8e9e9",
"#l c #e9e5e6",
"#j c #e9e8e8",
"#g c #e9e8e9",
"#d c #e9e9e9",
"#c c #e9e9ea",
"#b c #e9ecec",
"#i c #eae9e8",
".6 c #eae9e9",
".9 c #eae9ea",
"#e c #eaeae9",
".1 c #eaeaea",
"#a c #eaeaec",
".5 c #eaeaed",
"## c #eaecea",
"#. c #eaecec",
".4 c #eaeded",
".7 c #ece9ec",
".8 c #ecece9",
".2 c #edeaed",
".3 c #ededea",
".Y c #ededed",
".0 c #ededef",
".Z c #edefed",
".W c #efeded",
".X c #efedef",
".V c #efefed",
".U c #efefef",
".S c #efeff0",
".O c #eff2f2",
".T c #f0efef",
".N c #f0eff2",
".J c #f0f0f0",
".I c #f0f2f5",
".H c #f0f5f0",
".Q c #f2f0ef",
".R c #f2f2ef",
".M c #f2f2f0",
".P c #f2f2f2",
".K c #f2f5f5",
".F c #f5f0f5",
".G c #f5f5f0",
".L c #f5f5f2",
".B c #f5f5f5",
".E c #f5f6f5",
".A c #f5f6f6",
".C c #f6f5f5",
".D c #f6f6f3",
".z c #f6f6f6",
".y c #f6f6f8",
".w c #f6f8f6",
".x c #f8f6f6",
".v c #f8f6f8",
".u c #f8f8f6",
".r c #f8f8f8",
".t c #f8f8fb",
".s c #f8fbfb",
".p c #fbf8fb",
".q c #fbfbf8",
".o c #fbfbfb",
".m c #fbfbfc",
".l c #fbfcfb",
".h c #fbfcfc",
".k c #fcfbfb",
".g c #fcfbfc",
".n c #fcfcf9",
".i c #fcfcfb",
".c c #fcfcfc",
".# c #fcfcfe",
".j c #fcfefb",
".f c #fcfefc",
".a c #fcfefe",
".b c #fefcfc",
".d c #fefcfe",
".e c #fefefc",
"Qt c #fefefe",
"QtQt.#.a.b.c.dQt.e.e",
".c.#.#.#.f.c.c.fQt.c",
".g.c.#.c.c.h.i.j.d.c",
".c.c.i.c.c.h.i.k.l.c",
".g.m.k.m.n.l.o.o.l.k",
".p.o.o.o.q.o.o.o.o.o",
".r.s.r.p.r.q.q.o.t.r",
".r.r.r.r.r.u.r.r.r.r",
".u.v.u.w.w.r.x.x.y.w",
".u.y.u.w.w.r.x.x.y.w",
".z.A.z.z.z.z.z.z.z.z",
".B.z.C.A.D.C.B.B.E.B",
".B.B.F.B.G.B.B.H.B.B",
".G.I.J.K.B.L.J.I.L.L",
".M.N.J.O.P.Q.J.N.R.Q",
".S.T.J.S.U.S.J.T.U.U",
".U.U.U.U.U.S.U.U.U.U",
".V.W.X.Y.Z.U.V.U.0.0",
".Y.Y.Y.Y.Y.Y.Y.Y.Y.Y",
".1.2.1.3.1.1.4.4.5.4",
".6.7.1.8.9.1#.###a#b",
".9#c.1#d.6.1#d#d#e.6",
"#f#g.6#h#h#i#j#d#j.6",
"#k#l#l#m#m#l#l#d#n#d",
"#o#p#p#n#n#p#p#n#n#n",
"#q#q#q#o#q#r#q#r#q#s",
"#t#u#v#w#t#q#x#q#y#v",
"#t#t#z#A#t#B#C#x#D#E",
"#F#E#G#G#F#G#F#F#H#F",
"#I#J#I#I#I#I#K#I#I#L",
"#M#N#M#O#N#P#O#Q#O#O",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R",
"#R#R#R#R#R#R#R#R#R#R"};

static const unsigned char image1_data[] = { 
    0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
    0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10,
    0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x02,
    0x9d, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xa5, 0x93, 0x4d, 0x48, 0x54,
    0x51, 0x18, 0x86, 0x9f, 0x71, 0xee, 0xcc, 0xdc, 0xf9, 0xcf, 0xbf, 0x32,
    0x1a, 0x9d, 0x0a, 0x51, 0xb4, 0xcc, 0x4d, 0xb8, 0x08, 0x0a, 0x12, 0x42,
    0x5b, 0x24, 0x48, 0xb4, 0x68, 0x91, 0x59, 0x5a, 0x2d, 0x2a, 0x22, 0x5a,
    0x04, 0x51, 0x18, 0xb9, 0x29, 0x68, 0x93, 0x94, 0x51, 0x18, 0x14, 0x12,
    0x14, 0xad, 0x0c, 0x5d, 0x48, 0xa9, 0x50, 0xf6, 0x23, 0x9a, 0x58, 0x99,
    0x5a, 0x54, 0x5a, 0x08, 0xf9, 0xc3, 0x8c, 0xe6, 0xbd, 0x33, 0x73, 0xef,
    0xdc, 0x99, 0x7b, 0x5a, 0x0c, 0x6a, 0x56, 0xbb, 0xbe, 0xe5, 0xf9, 0xbe,
    0xf7, 0x3b, 0x0f, 0xef, 0x7b, 0x8e, 0xe5, 0x70, 0xdd, 0x75, 0xfe, 0xa7,
    0x24, 0x80, 0x3b, 0x2d, 0xc7, 0xc5, 0x9f, 0x8d, 0xa8, 0xb1, 0x7c, 0xa4,
    0x25, 0x4c, 0x00, 0xe2, 0x09, 0x41, 0x3c, 0x29, 0x30, 0x05, 0x84, 0x95,
    0x18, 0x37, 0x2e, 0xb5, 0x5a, 0xa4, 0x7f, 0x89, 0xb4, 0x84, 0xf9, 0xd7,
    0x30, 0x40, 0xc4, 0x94, 0xd0, 0x0c, 0x81, 0x96, 0x30, 0xf9, 0xfa, 0xe3,
    0xe7, 0x32, 0xc1, 0xa2, 0xd8, 0x48, 0x0a, 0x92, 0x42, 0xa0, 0xea, 0x26,
    0x5f, 0xde, 0x0e, 0xd1, 0x7e, 0xf3, 0x1a, 0x7e, 0xf1, 0x8d, 0x84, 0xc5,
    0x8a, 0xdd, 0xb5, 0x8a, 0xb9, 0xa8, 0x07, 0x32, 0x72, 0xb1, 0xba, 0xfd,
    0x24, 0x57, 0x6f, 0x40, 0x0b, 0x4d, 0x0a, 0x69, 0x51, 0xbc, 0x78, 0x6b,
    0xef, 0xe3, 0x36, 0x3a, 0x6e, 0x36, 0xb1, 0x79, 0x4b, 0x06, 0xf5, 0x67,
    0x8e, 0xe2, 0x91, 0xd3, 0x20, 0x1e, 0x25, 0xcd, 0x50, 0xb1, 0x1a, 0x0b,
    0x58, 0x12, 0x2a, 0x3d, 0x6d, 0x1d, 0xdc, 0x6f, 0x78, 0x8e, 0xec, 0xf8,
    0x8d, 0x40, 0xd5, 0x4d, 0x4c, 0x01, 0x63, 0x5d, 0xad, 0xd4, 0x9f, 0xad,
    0x65, 0xa8, 0xab, 0x93, 0xee, 0xfb, 0xf7, 0x50, 0x42, 0x33, 0xd8, 0xbc,
    0x7e, 0xb4, 0xa9, 0x09, 0x64, 0x87, 0x85, 0xe9, 0x89, 0x09, 0x72, 0xb3,
    0x72, 0x38, 0x7f, 0xa1, 0x96, 0x27, 0x5d, 0x3d, 0xa9, 0x05, 0x46, 0x52,
    0x10, 0x35, 0x04, 0xd1, 0x98, 0x86, 0xd3, 0xb7, 0x8a, 0xd2, 0xed, 0x3b,
    0x29, 0xdd, 0x51, 0x0e, 0x42, 0x60, 0x28, 0x1a, 0x00, 0x49, 0x5d, 0x67,
    0xf8, 0xc5, 0x33, 0x26, 0x7b, 0x1e, 0x92, 0x9f, 0x9f, 0x8f, 0xdd, 0xe3,
    0xc6, 0x6a, 0xb7, 0x93, 0x06, 0x90, 0x14, 0x29, 0x71, 0xc4, 0x5c, 0xe1,
    0x29, 0xb7, 0xce, 0x9d, 0xa6, 0xb1, 0xa6, 0x8a, 0xa4, 0xae, 0xaf, 0x8c,
    0xce, 0x29, 0x63, 0xf3, 0x7a, 0x31, 0x65, 0x77, 0x8a, 0x40, 0xd5, 0x4d,
    0x42, 0xba, 0x15, 0x10, 0x0c, 0x0f, 0x8c, 0x73, 0xb5, 0x7e, 0x3f, 0xd9,
    0x81, 0x20, 0xc1, 0x8d, 0x85, 0x94, 0x95, 0x57, 0x12, 0x8b, 0xa9, 0x38,
    0x9d, 0x1e, 0x00, 0xac, 0x92, 0x84, 0xc3, 0xe7, 0xc1, 0xe6, 0x75, 0x23,
    0x3b, 0x2c, 0xa9, 0x05, 0xa6, 0x80, 0xfe, 0x47, 0xad, 0x0c, 0x3e, 0x68,
    0x26, 0xaa, 0x4e, 0x12, 0x91, 0x36, 0xa1, 0xf4, 0xb5, 0xb3, 0xb7, 0x3a,
    0xc0, 0xfc, 0x77, 0xe8, 0xbc, 0x3d, 0x49, 0x78, 0x36, 0xc2, 0xfc, 0x9c,
    0x95, 0xea, 0xaa, 0x5d, 0x48, 0x5e, 0x17, 0x0e, 0xbf, 0x77, 0x39, 0x46,
    0x2d, 0x21, 0x88, 0x0f, 0xde, 0x63, 0x67, 0x79, 0x31, 0xd3, 0x53, 0x19,
    0xcc, 0x87, 0x17, 0x88, 0x85, 0x22, 0x4c, 0x7d, 0x9f, 0x21, 0x27, 0x6f,
    0x35, 0xe1, 0xd9, 0x08, 0x1e, 0x39, 0x9d, 0xdc, 0xe2, 0x2c, 0x24, 0xb7,
    0x13, 0xbb, 0xdf, 0x87, 0xcd, 0xef, 0xc3, 0xee, 0xf7, 0xa5, 0x3c, 0x88,
    0xc6, 0x34, 0xb2, 0x03, 0x41, 0x0e, 0x5e, 0xbc, 0xcc, 0x9a, 0x9c, 0x1c,
    0x0a, 0x8b, 0x0b, 0x68, 0xee, 0xeb, 0xa5, 0xb2, 0xae, 0x89, 0x89, 0xaf,
    0x2e, 0x6a, 0x6a, 0x8e, 0x71, 0xe8, 0xd4, 0x09, 0x4a, 0xb6, 0x95, 0x61,
    0x73, 0xbb, 0x70, 0x7b, 0x9c, 0x7c, 0x7a, 0xf7, 0x9e, 0x37, 0xaf, 0x47,
    0x58, 0xe9, 0x1a, 0x50, 0x51, 0x7b, 0x8c, 0xa1, 0xa7, 0x9d, 0x00, 0xac,
    0x2f, 0x2a, 0x61, 0x4d, 0x60, 0x3d, 0xe9, 0x79, 0x01, 0x1c, 0x7e, 0x2f,
    0x89, 0xf1, 0x71, 0xbe, 0xbc, 0xfb, 0x40, 0x7b, 0xd7, 0x00, 0x9f, 0x83,
    0x35, 0x04, 0xb7, 0x36, 0xa4, 0x9e, 0x72, 0x48, 0xb7, 0xf2, 0x2a, 0x9c,
    0xc7, 0xe8, 0x91, 0x93, 0x14, 0x66, 0xda, 0x58, 0x9b, 0x5f, 0x80, 0xaa,
    0x2d, 0x2c, 0x19, 0xa7, 0x1a, 0x3a, 0x77, 0xaf, 0xb4, 0xd0, 0x1f, 0x2f,
    0x43, 0x2e, 0x3a, 0x80, 0x7b, 0xcf, 0x3e, 0xec, 0x8a, 0x02, 0xfd, 0xdd,
    0x29, 0x82, 0x78, 0x5c, 0x47, 0xde, 0x7d, 0x84, 0x50, 0xdc, 0xe4, 0x25,
    0xa0, 0x8e, 0xf4, 0x11, 0x6b, 0xec, 0x20, 0x3d, 0xf6, 0x11, 0x75, 0xec,
    0x15, 0x6d, 0xa3, 0x12, 0x52, 0x45, 0x0b, 0xf6, 0xcc, 0x75, 0x98, 0x80,
    0xa2, 0x28, 0x4b, 0xc4, 0x96, 0xff, 0xfd, 0xce, 0xbf, 0x00, 0xe0, 0x4b,
    0x2d, 0x31, 0x7b, 0x20, 0x4a, 0x59, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45,
    0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};


/*
 *  Constructs a SearchForm as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
SearchForm::SearchForm( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl ),
      image0( (const char **) image0_data )
{
    QImage img;
    img.loadFromData( image1_data, sizeof( image1_data ), "PNG" );
    image1 = img;
    if ( !name )
	setName( "SearchForm" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setPaletteBackgroundPixmap( image0 );
    setIcon( image1 );
    SearchFormLayout = new QHBoxLayout( this, 11, 6, "SearchFormLayout"); 
    SearchFormLayout->setResizeMode( QLayout::Fixed );

    searchComboBox = new QComboBox( FALSE, this, "searchComboBox" );
    searchComboBox->setMinimumSize( QSize( 100, 0 ) );
    searchComboBox->setMaximumSize( QSize( 100, 32767 ) );
    SearchFormLayout->addWidget( searchComboBox );

    searchLineEdit = new QLineEdit( this, "searchLineEdit" );
    searchLineEdit->setMinimumSize( QSize( 300, 0 ) );
    searchLineEdit->setMaximumSize( QSize( 300, 32767 ) );
    SearchFormLayout->addWidget( searchLineEdit );

    searchButton = new QPushButton( this, "searchButton" );
    searchButton->setEnabled( FALSE );
    SearchFormLayout->addWidget( searchButton );

    cancelButton = new QPushButton( this, "cancelButton" );
    cancelButton->setMinimumSize( QSize( 20, 0 ) );
    cancelButton->setMaximumSize( QSize( 20, 32767 ) );
    SearchFormLayout->addWidget( cancelButton );
    languageChange();
    resize( QSize(513, 45).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( searchLineEdit, SIGNAL( returnPressed() ), searchButton, SLOT( animateClick() ) );
    connect( searchButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( cancelButton, SIGNAL( clicked() ), this, SLOT( close() ) );
    connect( searchLineEdit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotEnableSearch(const QString & ) ) );
}

/*
 *  Destroys the object and frees any allocated resources
 */
SearchForm::~SearchForm()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SearchForm::languageChange()
{
    setCaption( trUtf8( "\xec\xb0\xbe\xea\xb8\xb0" ) );
    searchButton->setText( trUtf8( "\xec\xb0\xbe\xea\xb8\xb0" ) );
    cancelButton->setText( tr( "X" ) );
}

void SearchForm::init()
{
  searchComboBox->clear();
}

void SearchForm::accept()
{
  emit searchArg( searchComboBox->currentItem (), searchLineEdit->text() );
  QDialog::accept();
}

void SearchForm::slotEnableSearch(const QString & s)
{
  if ( s.length() > 0 )
    searchButton->setEnabled( true );
  else
    searchButton->setEnabled( false );
}

#include "searchdialogbase.moc"

