[rkward-cvs] rkward/rkward/settings rksettingsmodulewatch.cpp,1.8,1.9 rksettingsmodulewatch.h,1.2,1.3

Thomas Friedrichsmeier tfry at users.sourceforge.net
Mon Oct 24 19:29:45 UTC 2005


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

Modified Files:
	rksettingsmodulewatch.cpp rksettingsmodulewatch.h 
Log Message:
Add setting for maximum number of lines in watch

Index: rksettingsmodulewatch.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmodulewatch.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** rksettingsmodulewatch.cpp	16 Oct 2005 21:40:55 -0000	1.8
--- rksettingsmodulewatch.cpp	24 Oct 2005 19:29:43 -0000	1.9
***************
*** 19,22 ****
--- 19,23 ----
  #include <klocale.h>
  #include <kconfig.h>
+ #include <knuminput.h>
  
  #include <qlayout.h>
***************
*** 31,40 ****
  //static
  int RKSettingsModuleWatch::plugin_filter;
- //static
  int RKSettingsModuleWatch::app_filter;
- //static
  int RKSettingsModuleWatch::sync_filter;
- //static
  int RKSettingsModuleWatch::user_filter;
  
  //static
--- 32,39 ----
  //static
  int RKSettingsModuleWatch::plugin_filter;
  int RKSettingsModuleWatch::app_filter;
  int RKSettingsModuleWatch::sync_filter;
  int RKSettingsModuleWatch::user_filter;
+ uint RKSettingsModuleWatch::max_log_lines;
  
  //static
***************
*** 143,146 ****
--- 142,153 ----
  	sync_filter_boxes = addFilterSettings (this, grid, 4, i18n ("Synchronisation commands"), sync_filter);
  
+ 	vbox->addSpacing (2*RKGlobals::spacingHint ());
+ 
+ 	vbox->addWidget (new QLabel (i18n ("Maximum number of paragraphs/lines to display in the Command Log"), this));
+ 	max_log_lines_spinner = new KIntSpinBox (0, 10000, 10, max_log_lines, 10, this);
+ 	max_log_lines_spinner->setSpecialValueText (i18n ("Unlimited"));
+ 	connect (max_log_lines_spinner, SIGNAL (valueChanged (int)), this, SLOT (changedSetting (int)));
+ 	vbox->addWidget (max_log_lines_spinner);
+ 
  	vbox->addStretch ();
  }
***************
*** 210,213 ****
--- 217,222 ----
  	config->writeEntry ("app command filter", app_filter);
  	config->writeEntry ("sync command filter", sync_filter);
+ 
+ 	config->writeEntry ("max log lines", max_log_lines);
  }
  
***************
*** 221,224 ****
--- 230,235 ----
  	app_filter = config->readNumEntry ("app command filter", ShowInput | ShowError);
  	sync_filter = config->readNumEntry ("sync command filter", (int) ShowError);
+ 
+ 	max_log_lines = config->readNumEntry ("max log lines", 1000);
  }
  
***************
*** 236,239 ****
--- 247,252 ----
  	app_filter = getFilterSettings (app_filter_boxes);
  	sync_filter = getFilterSettings (sync_filter_boxes);
+ 
+ 	max_log_lines = max_log_lines_spinner->value ();
  }
  

Index: rksettingsmodulewatch.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmodulewatch.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rksettingsmodulewatch.h	2 Sep 2004 10:50:26 -0000	1.2
--- rksettingsmodulewatch.h	24 Oct 2005 19:29:43 -0000	1.3
***************
*** 23,26 ****
--- 23,27 ----
  class QCheckBox;
  class QGridLayout;
+ class KIntSpinBox;
  
  /**
***************
*** 49,52 ****
--- 50,55 ----
  	static bool shouldRaiseWindow (RCommand *command);
  
+ 	static uint maxLogLines () { return max_log_lines; };
+ 
  	QString caption ();
  public slots:
***************
*** 71,77 ****
  	FilterBoxes *sync_filter_boxes;
  	FilterBoxes *user_filter_boxes;
! 	
  	int getFilterSettings (FilterBoxes *boxes);
  	FilterBoxes *addFilterSettings (QWidget *parent, QGridLayout *layout, int row, const QString &label, int state);
  };
  
--- 74,84 ----
  	FilterBoxes *sync_filter_boxes;
  	FilterBoxes *user_filter_boxes;
! 
  	int getFilterSettings (FilterBoxes *boxes);
  	FilterBoxes *addFilterSettings (QWidget *parent, QGridLayout *layout, int row, const QString &label, int state);
+ 
+ 	static uint max_log_lines;
+ 
+ 	KIntSpinBox *max_log_lines_spinner;
  };
  





More information about the rkward-tracker mailing list