[rkward-cvs] rkward/rkward Makefile.am,1.58,1.59 khelpdlg.cpp,1.11,1.12 khelpdlg.h,1.7,1.8 helpdlg.ui,1.3,NONE

Thomas Friedrichsmeier tfry at users.sourceforge.net
Fri Sep 30 10:41:32 UTC 2005


Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12677/rkward

Modified Files:
	Makefile.am khelpdlg.cpp khelpdlg.h 
Removed Files:
	helpdlg.ui 
Log Message:
Removing helpdlg.ui. Moving UI code into KHelpDlg instead.

Index: khelpdlg.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/khelpdlg.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** khelpdlg.cpp	29 Sep 2005 16:02:50 -0000	1.11
--- khelpdlg.cpp	30 Sep 2005 10:41:30 -0000	1.12
***************
*** 1,7 ****
  /***************************************************************************
!                           rkward.h  -  description
                               -------------------
!     begin                : Tue Oct 29 20:06:08 CET 2002 
!     copyright            : (C) 2002 by Thomas Friedrichsmeier 
      email                : tfry at users.sourceforge.net
   ***************************************************************************/
--- 1,7 ----
  /***************************************************************************
!                           khelpdlg  -  description
                               -------------------
!     begin                : Fri Feb 25 2005
!     copyright            : (C) 2005 by Thomas Friedrichsmeier
      email                : tfry at users.sourceforge.net
   ***************************************************************************/
***************
*** 16,25 ****
   ***************************************************************************/
  
!  // To be removed :
! #include <kmessagebox.h>
!  
!  
  #include <klocale.h>
! #include "kurl.h"
  
  #include <qcheckbox.h>
--- 16,23 ----
   ***************************************************************************/
  
! #include "khelpdlg.h"
! 
  #include <klocale.h>
! #include <kurl.h>
  
  #include <qcheckbox.h>
***************
*** 28,31 ****
--- 26,31 ----
  #include <qlineedit.h>
  #include <qregexp.h>
+ #include <qlayout.h>
+ #include <qlabel.h>
  
  #include "rbackend/rinterface.h"
***************
*** 35,71 ****
  #include "rkward.h"
  
- #include "khelpdlg.h"
- #include <kmessagebox.h>
- 
  #define GET_HELP_URL 1
  #define HELP_SEARCH 2
  #define GET_INSTALLED_PACKAGES 3
  
! KHelpDlg::KHelpDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
!     : helpDlg(parent,name, modal,fl)
! {
! 	resultsList->clear();
! 	resultsList->removeColumn(0);
! 	
! 	resultsList->addColumn (i18n ("Topic"));
! 	resultsList->addColumn (i18n ("Title"));
! 	resultsList->addColumn (i18n ("Package"));
! 	packagesList->insertItem (i18n("All"));
  
! 	// HACK the following is hardcoded, do not modify
  	fieldsList->insertItem (i18n("All"));
  	fieldsList->insertItem (i18n("All but keywords"));
  	fieldsList->insertItem (i18n("Keywords"));
  	fieldsList->insertItem (i18n("Title"));
  
! 	QLineEdit *edit=field->lineEdit();
  
! 	connect(edit, SIGNAL(returnPressed()), this, SLOT(slotFieldReturnPressed ()));
  
  
! 	RKGlobals::rInterface ()->issueCommand (".rk.get.installed.packages ()", RCommand::App | RCommand::Sync | RCommand::GetStringVector, QString::null, this, GET_INSTALLED_PACKAGES, 0);
  
  
! 	
  }
  
--- 35,103 ----
  #include "rkward.h"
  
  #define GET_HELP_URL 1
  #define HELP_SEARCH 2
  #define GET_INSTALLED_PACKAGES 3
  
! KHelpDlg::KHelpDlg (QWidget* parent, const char* name) : QWidget (parent, name) {
! 	QVBoxLayout* main_layout = new QVBoxLayout (this, RKGlobals::marginHint (), RKGlobals::spacingHint ());
! 	QHBoxLayout* selection_layout = new QHBoxLayout (main_layout, RKGlobals::spacingHint ());
  
! 
! 	QVBoxLayout* labels_layout = new QVBoxLayout (selection_layout, RKGlobals::spacingHint ());
! 	QLabel *label = new QLabel (i18n ("Find:"), this);
! 	label->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Minimum);
! 	labels_layout->addWidget (label);
! 	label = new QLabel (i18n ("Fields:"), this);
! 	label->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Minimum);
! 	labels_layout->addWidget (label);
! 
! 
! 	QVBoxLayout* main_settings_layout = new QVBoxLayout (selection_layout, RKGlobals::spacingHint ());
! 	field = new QComboBox (true, this);
! 	field->setSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
! 	connect (field->lineEdit () , SIGNAL (returnPressed ()), this, SLOT (slotFindButtonClicked ()));
! 	main_settings_layout->addWidget (field);
! 
! 	QHBoxLayout* fields_packages_layout = new QHBoxLayout (main_settings_layout, RKGlobals::spacingHint ());
! 	fieldsList = new QComboBox (false, this);
! 	// HACK the sequence of options is hardcoded, do not modify
  	fieldsList->insertItem (i18n("All"));
  	fieldsList->insertItem (i18n("All but keywords"));
  	fieldsList->insertItem (i18n("Keywords"));
  	fieldsList->insertItem (i18n("Title"));
+ 	fields_packages_layout->addWidget (fieldsList);
  
! 	label = new QLabel (i18n ("Package:"), this);
! 	label->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Minimum);
! 	fields_packages_layout->addWidget (label);
  
! 	packagesList = new QComboBox (false, this);
! 	packagesList->insertItem (i18n("All"));
! 	fields_packages_layout->addWidget (packagesList);
  
  
! 	QVBoxLayout* checkboxes_layout = new QVBoxLayout (selection_layout, RKGlobals::spacingHint ());
! 	caseSensitiveCheckBox = new QCheckBox (i18n ("Case sensitive"), this);
! 	checkboxes_layout->addWidget (caseSensitiveCheckBox);
! 	fuzzyCheckBox = new QCheckBox (i18n ("Fuzzy matching"), this);
! 	fuzzyCheckBox->setChecked (true);
! 	checkboxes_layout->addWidget (fuzzyCheckBox);
  
+ 	findButton = new QPushButton (i18n ("Find"), this);
+ 	findButton->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
+ 	connect (findButton, SIGNAL (clicked ()), this, SLOT (slotFindButtonClicked ()));
+ 	selection_layout->addWidget (findButton);
  
! 	resultsList = new QListView (this);
! 	resultsList->addColumn (i18n ("Topic"));
! 	resultsList->addColumn (i18n ("Title"));
! 	resultsList->addColumn (i18n ("Package"));
! 	connect (resultsList, SIGNAL (doubleClicked (QListViewItem*, const QPoint&, int)), this, SLOT (slotResultsListDblClicked (QListViewItem*, const QPoint&, int)));
! 	main_layout->addWidget (resultsList);
! 
! 
! 	RKGlobals::rInterface ()->issueCommand (".rk.get.installed.packages ()", RCommand::App | RCommand::Sync | RCommand::GetStringVector, QString::null, this, GET_INSTALLED_PACKAGES, 0);
! 
! 	setCaption (i18n ("Help search"));
  }
  
***************
*** 118,122 ****
  	}
  
! 	// HACK the following is hardcoded, do not modify
  	QString fields;
  	
--- 150,154 ----
  	}
  
! 	// HACK the sequence of options is hardcoded, do not modify
  	QString fields;
  	
***************
*** 160,169 ****
  }
  
- void KHelpDlg::slotPackageListActivated()
- {
- 
- }
- 
- 
  
  void KHelpDlg::rCommandDone (RCommand *command) {
--- 192,195 ----
***************
*** 200,209 ****
  #include "khelpdlg.moc"
  
- 
- 
- 
- void KHelpDlg::slotFieldReturnPressed (  )
- {
- 	slotFindButtonClicked ();
- }
- 
--- 226,227 ----

--- helpdlg.ui DELETED ---

Index: Makefile.am
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/Makefile.am,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** Makefile.am	17 Sep 2005 19:23:52 -0000	1.58
--- Makefile.am	30 Sep 2005 10:41:30 -0000	1.59
***************
*** 6,10 ****
  rkward_SOURCES = rkwatch.cpp rkward.cpp main.cpp rkoutputwindow.cpp \
  	rkcommandeditor.cpp rkglobals.cpp robjectbrowser.cpp rkeditormanager.cpp robjectviewer.cpp \
! 	helpdlg.ui khelpdlg.cpp rkconsole.cpp rkward.skel
  
  rkward_LDADD = $(top_builddir)/rkward/windows/libwindows.a \
--- 6,10 ----
  rkward_SOURCES = rkwatch.cpp rkward.cpp main.cpp rkoutputwindow.cpp \
  	rkcommandeditor.cpp rkglobals.cpp robjectbrowser.cpp rkeditormanager.cpp robjectviewer.cpp \
! 	khelpdlg.cpp rkconsole.cpp rkward.skel
  
  rkward_LDADD = $(top_builddir)/rkward/windows/libwindows.a \

Index: khelpdlg.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/khelpdlg.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** khelpdlg.h	17 Sep 2005 19:23:52 -0000	1.7
--- khelpdlg.h	30 Sep 2005 10:41:30 -0000	1.8
***************
*** 1,7 ****
  /***************************************************************************
!                           rkward.h  -  description
                               -------------------
!     begin                : Tue Oct 29 20:06:08 CET 2002 
!     copyright            : (C) 2002 by Thomas Friedrichsmeier 
      email                : tfry at users.sourceforge.net
   ***************************************************************************/
--- 1,7 ----
  /***************************************************************************
!                           khelpdlg  -  description
                               -------------------
!     begin                : Fri Feb 25 2005
!     copyright            : (C) 2005 by Thomas Friedrichsmeier
      email                : tfry at users.sourceforge.net
   ***************************************************************************/
***************
*** 19,35 ****
  #define KHELPDLG_H
  
  #include "rbackend/rcommandreceiver.h"
  
! #include "helpdlg.h"
  
  class RCommandChain;
  
! class KHelpDlg : public helpDlg, public RCommandReceiver
! {
!   Q_OBJECT
  
  public:
!     KHelpDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
!     ~KHelpDlg();
      void rCommandDone (RCommand *command);
  
--- 19,44 ----
  #define KHELPDLG_H
  
+ #include <qwidget.h>
+ 
  #include "rbackend/rcommandreceiver.h"
  
! //#include "helpdlg.h"
! 
! class QComboBox;
! class QCheckBox;
! class QPushButton;
! class QListView;
! class QListViewItem;
  
  class RCommandChain;
  
! /** Provides a UI interface for help-search.
  
+ @author Pierre Ecochard */
+ class KHelpDlg : public QWidget, public RCommandReceiver {
+   Q_OBJECT
  public:
!     KHelpDlg (QWidget* parent = 0, const char* name = 0);
!     ~KHelpDlg ();
      void rCommandDone (RCommand *command);
  
***************
*** 40,55 ****
  	void getContextHelp (const QString &context_line, int cursor_pos);
  
-   /*$PUBLIC_FUNCTIONS$*/
- 
  public slots:
!   /*$PUBLIC_SLOTS$*/
!   virtual void          slotFindButtonClicked();
!   virtual void          slotResultsListDblClicked( QListViewItem *item, const QPoint &, int );
!   virtual void          slotPackageListActivated();
!   virtual void          slotFieldReturnPressed();
! 
! protected slots:
!   /*$PROTECTED_SLOTS$*/
  private:
      RCommandChain *chain;
  };
--- 49,64 ----
  	void getContextHelp (const QString &context_line, int cursor_pos);
  
  public slots:
! 	void slotFindButtonClicked();
! 	void slotResultsListDblClicked( QListViewItem *item, const QPoint &, int );
  private:
+     QComboBox* field;
+     QComboBox* fieldsList;
+     QComboBox* packagesList;
+     QCheckBox* caseSensitiveCheckBox;
+     QCheckBox* fuzzyCheckBox;
+     QPushButton* findButton;
+     QListView* resultsList;
+ 
      RCommandChain *chain;
  };





More information about the rkward-tracker mailing list