• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

akonadi/clients

searchdialog.cpp

Go to the documentation of this file.
00001 /*
00002     This file is part of Akonadi.
00003 
00004     Copyright (c) 2008 Tobias Koenig <tokoe@kde.org>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
00019     USA.
00020 */
00021 
00022 #include "searchdialog.h"
00023 
00024 #include <QtGui/QLabel>
00025 #include <QtGui/QLayout>
00026 #include <QtGui/QLineEdit>
00027 #include <QtGui/QTextEdit>
00028 
00029 SearchDialog::SearchDialog( QWidget *parent )
00030   : KDialog( parent )
00031 {
00032   setCaption( "Create Search" );
00033   setButtons( Ok | Cancel );
00034 
00035   QWidget *widget = new QWidget( this );
00036   setMainWidget( widget );
00037 
00038   QGridLayout *layout = new QGridLayout( widget );
00039 
00040   mName = new QLineEdit;
00041   mName->setText( "My Search" );
00042   mEdit = new QTextEdit;
00043   mEdit->setAcceptRichText( false );
00044   mEdit->setWhatsThis( "Enter a SparQL query here" );
00045 
00046   layout->addWidget( new QLabel( "Search Query Name:" ), 0, 0 );
00047   layout->addWidget( mName, 0, 1 );
00048   layout->addWidget( mEdit, 1, 0, 1, 2 );
00049 }
00050 
00051 SearchDialog::~SearchDialog()
00052 {
00053 }
00054 
00055 QString SearchDialog::searchName() const
00056 {
00057   return mName->text();
00058 }
00059 
00060 QString SearchDialog::searchQuery() const
00061 {
00062   return mEdit->toPlainText();
00063 }

akonadi/clients

Skip menu "akonadi/clients"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal