summaryrefslogtreecommitdiffstats
path: root/kpovmodeler/pmlibraryobjectsearch.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kpovmodeler/pmlibraryobjectsearch.cpp
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpovmodeler/pmlibraryobjectsearch.cpp')
-rw-r--r--kpovmodeler/pmlibraryobjectsearch.cpp86
1 files changed, 86 insertions, 0 deletions
diff --git a/kpovmodeler/pmlibraryobjectsearch.cpp b/kpovmodeler/pmlibraryobjectsearch.cpp
new file mode 100644
index 00000000..428da887
--- /dev/null
+++ b/kpovmodeler/pmlibraryobjectsearch.cpp
@@ -0,0 +1,86 @@
+/*
+**************************************************************************
+ description
+ --------------------
+ copyright : (C) 2002 by Luis Carvalho
+ email : lpassos@mail.telepac.pt
+**************************************************************************
+
+**************************************************************************
+* *
+* 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 "pmlibraryobject.h"
+#include "pmlibraryentrypreview.h"
+#include "pmlibraryobjectsearch.h"
+#include "pmdialogeditbase.h"
+
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qpixmap.h>
+#include <qimage.h>
+#include <qframe.h>
+
+#include <kurl.h>
+#include <klocale.h>
+#include <kdialog.h>
+#include <klistview.h>
+
+PMLibraryObjectSearch::PMLibraryObjectSearch( QWidget* parent ) :
+ QWidget( parent, "" )
+{
+ setMinimumSize( 780, 300 );
+ setMaximumSize( 800, 400 );
+ QVBoxLayout* vl = new QVBoxLayout( this, KDialog::spacingHint( ) );
+
+ // Search parameters
+ QFrame* frame = new QFrame( this );
+ QHBoxLayout* fhl = new QHBoxLayout( frame, KDialog::spacingHint( ) );
+ QGridLayout* grid = new QGridLayout( fhl, 3, 2 );
+ QLabel *lbl = new QLabel( i18n( "Search for:" ), frame );
+ m_pSearch = new QLineEdit( frame );
+ grid->addWidget( lbl, 0, 0 );
+ grid->addWidget( m_pSearch, 0, 1 );
+
+ QVBoxLayout* fvl = new QVBoxLayout( fhl );
+ m_pSearchButton = new QPushButton( i18n( "&Search" ), frame );
+ fvl->addWidget( m_pSearchButton );
+ fvl->addStretch( 1 );
+
+ vl->addWidget( frame );
+
+ // Search results
+ frame = new QFrame( this );
+ QHBoxLayout* hl = new QHBoxLayout( frame, KDialog::spacingHint( ) );
+ m_pFileList = new KListView( frame );
+ m_pFileList->addColumn( i18n( "File" ) );
+ m_pFileList->addColumn( i18n( "Path" ) );
+ m_pFileList->setFullWidth( true );
+ m_pPreview = new PMLibraryEntryPreview( frame );
+ hl->addWidget( m_pFileList, 1 );
+ hl->addWidget( m_pPreview );
+ vl->addWidget( frame );
+
+ // Connect signals and slots
+ connect( m_pSearchButton, SIGNAL( clicked( ) ), SLOT( slotSearchButtonPressed( ) ) );
+}
+
+void PMLibraryObjectSearch::slotSearchButtonPressed( )
+{
+// QStringList::Iterator it( s_libraryPath );
+ // For each of the defined libraries
+ //
+ // Open recursively each library file
+ // Check if any of the strings contains the search words
+ // If it does add to the list
+}
+
+#include "pmlibraryobjectsearch.moc"