git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knetload@1091561 283d02a7-25f6-0310-bc7c-ecb5cbfe19dav3.5.13-sru
commit
dba97e292b
@ -0,0 +1,3 @@
|
||||
Markus Gustavsson <mighty@fragzone.se>
|
||||
Ben Burton <bab@debian.org>
|
||||
Flameeyes <dgp85@users.sourceforge.net>
|
@ -0,0 +1,94 @@
|
||||
04-07-11 * Thanks to coolo, mlaurent and deller for fixes all around
|
||||
while I wasn't present.
|
||||
* Added version.h file (set as 2.2.90, as CVS of 2.3).
|
||||
* Canceled patch for knetload.desktop for icon name (bug in
|
||||
freedesktop documentation?).
|
||||
|
||||
04-06-30 * Applied a patch for freedesktop standardization of the
|
||||
.desktop file. Thanks to Ville Skyttä.
|
||||
|
||||
04-06-28 * Merged CVS version with 2.2.2, will be released as 2.3.0
|
||||
|
||||
04-05-09 * v2.2.2
|
||||
* Fixed the device dialog, now under Linux, both 2.6 and 2.4,
|
||||
it's filled with active interfaces.
|
||||
* Now /proc/net/dev is parsed when /sys interface isn't
|
||||
available (Linux 2.4 and earlier) to find out the present
|
||||
interfaces.
|
||||
* Modified scaling menu icons, now there are two different
|
||||
icons for scale in and scale out.
|
||||
|
||||
04-05-07 * v2.2.1
|
||||
* Fixed a bug reading the value from the file (using fscanf).
|
||||
|
||||
04-05-07 * v2.2
|
||||
* Moved to a new version of automake scripts.
|
||||
* Added support for i18n and added french and russian
|
||||
translations, thanks to Sagittarius and Sergey V Turchin.
|
||||
* Merged two patch for i18n also by Sergey.
|
||||
|
||||
04-05-05 * v2.1.1
|
||||
* Typo fixed, should work right now :)
|
||||
|
||||
04-05-03 * v2.1
|
||||
* Changed the buffer size from 11-bytes to 20 (I'm not sure,
|
||||
but seems to segfault with the smallest buffer, and 9 bytes
|
||||
aren't so much).
|
||||
* The Device submenu now is filled with the interfaces which
|
||||
are present in the system, when used under Linux 2.6.
|
||||
|
||||
04-05-01 * v2.0
|
||||
* Flameeyes: chagned knetproc to use different functions for
|
||||
different OSes. Added support for /sys interface (no need to
|
||||
parse in this case).
|
||||
* Fixed the rollover bug at 4Gb Tx or Rx.
|
||||
|
||||
02-12-21 * Added BSD and Solaris support thanks to Roland Riegel and
|
||||
many others.
|
||||
|
||||
02-12-17 * v1.99.
|
||||
* Ported to KDE3.
|
||||
* Completely restructured, with the aims of:
|
||||
- sharing as much code as possible between KCPULoad
|
||||
and KNetLoad;
|
||||
- looking and behaving more like other KDE apps
|
||||
(including more respect for system settings and i18n);
|
||||
- making the code more maintainable (such as providing
|
||||
source documentation).
|
||||
* Removed references to original website which is now offline.
|
||||
Hopefully the new home will be KDE CVS.
|
||||
* New maintainer Ben Burton <bab@debian.org>.
|
||||
|
||||
00-10-24 * v1.91 Added feature for different In/Out speeds
|
||||
for use by ADSL and Cable Modem users.
|
||||
|
||||
00-10-01 * v1.90 Ported to QT 2.x / KDE 1.9x/2.x (prerelease)
|
||||
|
||||
99-09-15 * Fixed a bug where program don't show any readings
|
||||
when the pppdaemon is disconncted and restarted.
|
||||
|
||||
99-09-13 * Added German translation thanks to Fredrik Olson.
|
||||
|
||||
99-09-09 * Fixed bug where program can't measure any readings
|
||||
after sent or received bytes has gone above 2100MB.
|
||||
* Added a new Soft diagram option for a smoother curve.
|
||||
* Added user documentation for installation and usage.
|
||||
* The infopopup's text now stays inside the box :)
|
||||
|
||||
99-09-07 * Added Croatian translation thanks to Vladimir Vuksan.
|
||||
* Finished a new specialdesigned QToolTip lookalike,
|
||||
leftclick to show it, leftclick again or rightclick
|
||||
on popup to hide, use left mouse on popup to move it.
|
||||
* Structure changes to make the program use less CPU.
|
||||
|
||||
99-09-01 * Added several icons for both Color and style menues.
|
||||
|
||||
99-08-31 * Settings are now saved direcly, not only upon quit.
|
||||
* Added sessionmanagement thanks to Carsten Pfeiffer,
|
||||
so the program will restart when KDE is restarted.
|
||||
* Removed QToolTip Popup info dialog from program
|
||||
because of a mem leak which made the program hang.
|
||||
|
||||
99-08-29 * Added Swedish translation.
|
||||
|
||||
99-08-11 * Program ready for initial release v1.0.
|
@ -0,0 +1,248 @@
|
||||
# Doxyfile 1.3.5-KDevelop
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = knetload.kdevelop
|
||||
PROJECT_NUMBER = $VERSION$
|
||||
OUTPUT_DIRECTORY =
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH = /home/flame/devel/knetload-2.0/
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = /home/flame/devel/knetload-2.0
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
*.cpp \
|
||||
*.c++ \
|
||||
*.java \
|
||||
*.ii \
|
||||
*.ixx \
|
||||
*.ipp \
|
||||
*.i++ \
|
||||
*.inl \
|
||||
*.h \
|
||||
*.hh \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.h++ \
|
||||
*.idl \
|
||||
*.odl \
|
||||
*.cs \
|
||||
*.php \
|
||||
*.php3 \
|
||||
*.inc \
|
||||
*.C \
|
||||
*.H \
|
||||
*.tlh \
|
||||
*.diff \
|
||||
*.patch \
|
||||
*.moc \
|
||||
*.xpm \
|
||||
*.dox
|
||||
RECURSIVE = yes
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = YES
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = yes
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
@ -0,0 +1,167 @@
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes a while. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
4. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made.
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
@ -0,0 +1,21 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.5
|
||||
|
||||
include admin/deps.am
|
||||
include admin/Doxyfile.am
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# KNetLoad is copyright (c) 1999-2000, Markus Gustavsson #
|
||||
# (c) 2002, Ben Burton #
|
||||
# #
|
||||
# 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. #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
|
||||
EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README TODO
|
||||
|
||||
SUBDIRS=$(TOPSUBDIRS)
|
@ -0,0 +1,20 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.5
|
||||
|
||||
include admin/deps.am
|
||||
include admin/Doxyfile.am
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# KNetLoad is copyright (c) 1999-2000, Markus Gustavsson #
|
||||
# (c) 2002, Ben Burton #
|
||||
# #
|
||||
# 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. #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
|
||||
EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL README TODO
|
||||
|
@ -0,0 +1,14 @@
|
||||
all:
|
||||
@echo "This Makefile is only for the CVS repository"
|
||||
@echo "This will be deleted before making the distribution"
|
||||
@echo ""
|
||||
@if test ! -d admin; then \
|
||||
echo "Please recheckout this module!" ;\
|
||||
echo "for cvs: use checkout once and after that update again" ;\
|
||||
echo "for cvsup: checkout kde-common from cvsup and" ;\
|
||||
echo " link kde-common/admin to ./admin" ;\
|
||||
exit 1 ;\
|
||||
fi
|
||||
$(MAKE) -f admin/Makefile.common cvs
|
||||
|
||||
.SILENT:
|
@ -0,0 +1,28 @@
|
||||
|
||||
KNETLoad
|
||||
|
||||
This file should only be read as a fast description. The online
|
||||
KNetLoad handbook contains more detailed information.
|
||||
|
||||
This is a network throughput meter for Kicker (the KDE panel). It will
|
||||
show the traffic on a network device with two diagrams, one for outgoing and
|
||||
one for incoming data. KNetLoad can read almost any device that is listed
|
||||
in the /proc/net/dev file, which includes eth0, ppp0, ippp0 and many others;
|
||||
even non predefined devices can be typed into the program. The colors, style
|
||||
and speed of the diagrams can be configured.
|
||||
|
||||
To bring up the settings menu, simply right click on the diagram. Before
|
||||
KNetLoad will work you must define what device it should use, and set the
|
||||
correct scaling value which depends on the speed of your network device.
|
||||
|
||||
Left click on the diagram to bring up a small information box which will
|
||||
show the exact input and output speeds in text form, and the total amount
|
||||
of outgoing and incoming data.
|
||||
|
||||
Install:
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
Markus Gustavsson <mighty@fragzone.se>
|
@ -0,0 +1,3 @@
|
||||
|
||||
In the device dialog, fill the combo fix with a list of all currently
|
||||
active interfaces. [Done on Linux]
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,237 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define if you have the CoreAudio API */
|
||||
#undef HAVE_COREAUDIO
|
||||
|
||||
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||
#undef HAVE_CRT_EXTERNS_H
|
||||
|
||||
/* Defines if your system has the crypt function */
|
||||
#undef HAVE_CRYPT
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have libjpeg */
|
||||
#undef HAVE_LIBJPEG
|
||||
|
||||
/* Define if you have libpng */
|
||||
#undef HAVE_LIBPNG
|
||||
|
||||
/* Define if you have a working libpthread (will enable threaded code) */
|
||||
#undef HAVE_LIBPTHREAD
|
||||
|
||||
/* Define if you have libz */
|
||||
#undef HAVE_LIBZ
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if your system needs _NSGetEnviron to set up the environment */
|
||||
#undef HAVE_NSGETENVIRON
|
||||
|
||||
/* Define if you have res_init */
|
||||
#undef HAVE_RES_INIT
|
||||
|
||||
/* Define if you have the res_init prototype */
|
||||
#undef HAVE_RES_INIT_PROTO
|
||||
|
||||
/* Define if you have a STL implementation by SGI */
|
||||
#undef HAVE_SGI_STL
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define if you have strlcat */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define if you have the strlcat prototype */
|
||||
#undef HAVE_STRLCAT_PROTO
|
||||
|
||||
/* Define if you have strlcpy */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define if you have the strlcpy prototype */
|
||||
#undef HAVE_STRLCPY_PROTO
|
||||
|
||||
/* Define to 1 if you have the <sys/bitypes.h> header file. */
|
||||
#undef HAVE_SYS_BITYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Suffix for lib directories */
|
||||
#undef KDELIBSUFF
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `char *', as computed by sizeof. */
|
||||
#undef SIZEOF_CHAR_P
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#undef SIZEOF_SIZE_T
|
||||
|
||||
/* The size of `unsigned long', as computed by sizeof. */
|
||||
#undef SIZEOF_UNSIGNED_LONG
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* If we use arts volume */
|
||||
#undef USE_ARTS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Defined if compiling without arts */
|
||||
#undef WITHOUT_ARTS
|
||||
|
||||
/*
|
||||
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
|
||||
* headers and I'm too lazy to write a configure test as long as only
|
||||
* unixware is related
|
||||
*/
|
||||
#ifdef _UNIXWARE
|
||||
#define HAVE_BOOLEAN
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
|
||||
* that defines bzero.
|
||||
*/
|
||||
|
||||
#if defined(_AIX)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
|
||||
# include <sys/time.h>
|
||||
# include <crt_externs.h>
|
||||
# define environ (*_NSGetEnviron())
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if !defined(HAVE_RES_INIT_PROTO)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int res_init(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if !defined(HAVE_STRLCAT_PROTO)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
unsigned long strlcat(char*, const char*, unsigned long);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if !defined(HAVE_STRLCPY_PROTO)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
unsigned long strlcpy(char*, const char*, unsigned long);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* On HP-UX, the declaration of vsnprintf() is needed every time !
|
||||
*/
|
||||
|
||||
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
|
||||
#if __STDC__
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int snprintf(char *str, size_t n, char const *fmt, ...);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined(__SVR4) && !defined(__svr4__)
|
||||
#define __svr4__ 1
|
||||
#endif
|
||||
|
||||
|
||||
/* type to use in place of socklen_t if not defined */
|
||||
#undef kde_socklen_t
|
||||
|
||||
/* type to use in place of socklen_t if not defined (deprecated, use
|
||||
kde_socklen_t) */
|
||||
#undef ksize_t
|
@ -0,0 +1,2 @@
|
||||
./admin/configure.in.min
|
||||
configure.in.in
|
@ -0,0 +1,141 @@
|
||||
dnl =======================================================
|
||||
dnl FILE: ./admin/configure.in.min
|
||||
dnl =======================================================
|
||||
|
||||
dnl This file is part of the KDE libraries/packages
|
||||
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
|
||||
|
||||
dnl This file is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Library General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2 of the License, or (at your option) any later version.
|
||||
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Library General Public License for more details.
|
||||
|
||||
dnl You should have received a copy of the GNU Library General Public License
|
||||
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||||
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
dnl Boston, MA 02110-1301, USA.
|
||||
|
||||
# Original Author was Kalle@kde.org
|
||||
# I lifted it in some mater. (Stephan Kulow)
|
||||
# I used much code from Janos Farkas
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(acinclude.m4) dnl a source file from your sub dir
|
||||
|
||||
dnl This is so we can use kde-common
|
||||
AC_CONFIG_AUX_DIR(admin)
|
||||
|
||||
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
|
||||
unset CDPATH
|
||||
|
||||
dnl Checking host/target/build systems, for make, install etc.
|
||||
AC_CANONICAL_SYSTEM
|
||||
dnl Perform program name transformation
|
||||
AC_ARG_PROGRAM
|
||||
|
||||
dnl Automake doc recommends to do this only here. (Janos)
|
||||
AM_INIT_AUTOMAKE(knetload-2.3, "3.2.92") dnl searches for some needed programs
|
||||
|
||||
KDE_SET_PREFIX
|
||||
|
||||
dnl generate the config header
|
||||
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_CHECK_COMPILERS
|
||||
AC_ENABLE_SHARED(yes)
|
||||
AC_ENABLE_STATIC(no)
|
||||
KDE_PROG_LIBTOOL
|
||||
|
||||
dnl for NLS support. Call them in this order!
|
||||
dnl WITH_NLS is for the po files
|
||||
AM_KDE_WITH_NLS
|
||||
|
||||
KDE_USE_QT(3.2)
|
||||
AC_PATH_KDE
|
||||
dnl =======================================================
|
||||
dnl FILE: configure.in.in
|
||||
dnl =======================================================
|
||||
|
||||
#MIN_CONFIG(3.2)
|
||||
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
|
||||
|
||||
if test "$build_arts" = "yes"; then
|
||||
AC_DEFINE(USE_ARTS, 1, [If we use arts volume])
|
||||
LIB_ARTS="-lartskde"
|
||||
AC_SUBST(LIB_ARTS)
|
||||
fi
|
||||
|
||||
KDE_INIT_DOXYGEN([The API Reference], [Version $VERSION])
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
KDE_CREATE_SUBDIRSLIST
|
||||
AM_CONDITIONAL(icons_SUBDIR_included, test "x$icons_SUBDIR_included" = xyes)
|
||||
AM_CONDITIONAL(knetload_SUBDIR_included, test "x$knetload_SUBDIR_included" = xyes)
|
||||
AM_CONDITIONAL(po_SUBDIR_included, test "x$po_SUBDIR_included" = xyes)
|
||||
AC_CONFIG_FILES([ Makefile ])
|
||||
AC_CONFIG_FILES([ icons/Makefile ])
|
||||
AC_CONFIG_FILES([ knetload/Makefile ])
|
||||
AC_CONFIG_FILES([ po/Makefile ])
|
||||
AC_CONFIG_FILES([ po/ar/Makefile ])
|
||||
AC_CONFIG_FILES([ po/bs/Makefile ])
|
||||
AC_CONFIG_FILES([ po/ca/Makefile ])
|
||||
AC_CONFIG_FILES([ po/cs/Makefile ])
|
||||
AC_CONFIG_FILES([ po/da/Makefile ])
|
||||
AC_CONFIG_FILES([ po/de/Makefile ])
|
||||
AC_CONFIG_FILES([ po/en_GB/Makefile ])
|
||||
AC_CONFIG_FILES([ po/es/Makefile ])
|
||||
AC_CONFIG_FILES([ po/et/Makefile ])
|
||||
AC_CONFIG_FILES([ po/fr/Makefile ])
|
||||
AC_CONFIG_FILES([ po/is/Makefile ])
|
||||
AC_CONFIG_FILES([ po/it/Makefile ])
|
||||
AC_CONFIG_FILES([ po/ja/Makefile ])
|
||||
AC_CONFIG_FILES([ po/nb/Makefile ])
|
||||
AC_CONFIG_FILES([ po/nl/Makefile ])
|
||||
AC_CONFIG_FILES([ po/pt/Makefile ])
|
||||
AC_CONFIG_FILES([ po/pt_BR/Makefile ])
|
||||
AC_CONFIG_FILES([ po/ro/Makefile ])
|
||||
AC_CONFIG_FILES([ po/sr/Makefile ])
|
||||
AC_CONFIG_FILES([ po/sv/Makefile ])
|
||||
AC_CONFIG_FILES([ po/ta/Makefile ])
|
||||
AC_CONFIG_FILES([ po/tr/Makefile ])
|
||||
AC_CONFIG_FILES([ po/xx/Makefile ])
|
||||
AC_CONFIG_FILES([ po/zh_CN/Makefile ])
|
||||
AC_CONFIG_FILES([ po/zh_TW/Makefile ])
|
||||
AC_OUTPUT
|
||||
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
|
||||
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
|
||||
# And if so, warn when they don't match
|
||||
if test "$kde_libs_prefix" != "$given_prefix"; then
|
||||
# And if kde doesn't know about the prefix yet
|
||||
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
|
||||
if test $? -ne 0; then
|
||||
echo ""
|
||||
echo "Warning: you chose to install this package in $given_prefix,"
|
||||
echo "but KDE was found in $kde_libs_prefix."
|
||||
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
|
||||
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
|
||||
echo "Then restart KDE."
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$all_tests" = "bad"; then
|
||||
if test ! "$cache_file" = "/dev/null"; then
|
||||
echo ""
|
||||
echo "Please remove the file $cache_file after changing your setup"
|
||||
echo "so that configure will find the changes next time."
|
||||
echo ""
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo "Good - your configure finished. Start make now"
|
||||
echo ""
|
||||
fi
|
@ -0,0 +1,12 @@
|
||||
#MIN_CONFIG(3.2)
|
||||
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
|
||||
|
||||
if test "$build_arts" = "yes"; then
|
||||
AC_DEFINE(USE_ARTS, 1, [If we use arts volume])
|
||||
LIB_ARTS="-lartskde"
|
||||
AC_SUBST(LIB_ARTS)
|
||||
fi
|
||||
|
||||
KDE_INIT_DOXYGEN([The API Reference], [Version $VERSION])
|
||||
|
||||
AM_MAINTAINER_MODE
|
@ -0,0 +1,18 @@
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# KNetLoad action icons. #
|
||||
# #
|
||||
# KNetLoad is copyright (c) 1999-2000, Markus Gustavsson #
|
||||
# (c) 2002, Ben Burton #
|
||||
# #
|
||||
# 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. #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
iconsdir = $(kde_datadir)/knetload/icons
|
||||
icons_ICON = AUTO
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,54 @@
|
||||
|
||||
############################################################################
|
||||
# #
|
||||
# Main KNetLoad sources. #
|
||||
# #
|
||||
# KNetLoad is copyright (c) 1999-2000, Markus Gustavsson #
|
||||
# (c) 2002, Ben Burton #
|
||||
# #
|
||||
# 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. #
|
||||
# #
|
||||
############################################################################
|
||||
|
||||
INCLUDES = $(all_includes)
|
||||
|
||||
bin_PROGRAMS = knetload
|
||||
|
||||
knetload_LDFLAGS = $(KDE_RPATH) $(all_libraries)
|
||||
|
||||
knetload_LDADD = $(LIB_KDEUI)
|
||||
|
||||
knetload_SOURCES = \
|
||||
devicedialog.cpp \
|
||||
icontoggleaction.cpp \
|
||||
knetdock.cpp \
|
||||
knetload.cpp \
|
||||
knetproc.cpp \
|
||||
main.cpp \
|
||||
scaledialog.cpp \
|
||||
speeddialog.cpp \
|
||||
statdock.cpp \
|
||||
statpopup.cpp
|
||||
|
||||
noinst_HEADERS = \
|
||||
devicedialog.h \
|
||||
icontoggleaction.h \
|
||||
knetdock.h \
|
||||
knetload.h \
|
||||
knetproc.h \
|
||||
scaledialog.h \
|
||||
speeddialog.h \
|
||||
statdock.h \
|
||||
statpopup.h
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
xdg_apps_DATA = knetload.desktop
|
||||
|
||||
KDE_ICON = knetload
|
||||
|
||||
messages: rc.cpp
|
||||
$(XGETTEXT) *.cpp *.h -o $(podir)/knetload.pot
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,106 @@
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* KNetLoad is copyright (c) 1999-2000, Markus Gustavsson *
|
||||
* (c) 2002, Ben Burton *
|
||||
* *
|
||||
* 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 "devicedialog.h"
|
||||
|
||||
#include <kcombobox.h>
|
||||
#include <klocale.h>
|
||||
#include <qlabel.h>
|
||||
#include <qhbox.h>
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#include <qdir.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#define MAX_NET_DEV_LINE 512
|
||||
|
||||
DeviceDialog::DeviceDialog(const QString& defaultDevice, QWidget* parent) :
|
||||
KDialogBase(parent, "device dialog", true,
|
||||
i18n("Select Network Device"), Ok|Cancel, Ok),
|
||||
device(defaultDevice) {
|
||||
QHBox* page = makeHBoxMainWidget();
|
||||
|
||||
new QLabel(i18n("Network device to monitor:"), page);
|
||||
|
||||
// Items in the combo box are not wrapped with i18n() since they're
|
||||
// literal interface names.
|
||||
KComboBox* deviceBox = new KComboBox(true, page);
|
||||
|
||||
#ifndef Q_OS_LINUX
|
||||
deviceBox->insertItem("lo");
|
||||
deviceBox->insertItem("eth0");
|
||||
deviceBox->insertItem("ippp0");
|
||||
deviceBox->insertItem("ppp0");
|
||||
#else
|
||||
if ( QDir::root().exists("/sys/class/net") )
|
||||
{ // Exists /sys, 2.6 series kernel
|
||||
QDir sys("/sys/class/net");
|
||||
QStringList l = sys.entryList();
|
||||
for(QStringList::iterator it = l.begin(); it != l.end(); it++)
|
||||
{
|
||||
if ( (*it)[0] == '.' )
|
||||
continue;
|
||||
deviceBox->insertItem( *it );
|
||||
}
|
||||
} else { // Doesn't exists, kernel 2.4 or earlier
|
||||
static FILE* fd;
|
||||
static char line[MAX_NET_DEV_LINE];
|
||||
static char* pos;
|
||||
static char* iface;
|
||||
|
||||
|
||||
if ((fd = fopen("/proc/net/dev", "r")) == 0)
|
||||
return;
|
||||
|
||||
// Read the unwanted header lines.
|
||||
fgets(line, MAX_NET_DEV_LINE, fd);
|
||||
fgets(line, MAX_NET_DEV_LINE, fd);
|
||||
|
||||
// Read through the remaining lines until we find all devices
|
||||
while (! feof(fd)) {
|
||||
fgets(line, MAX_NET_DEV_LINE, fd);
|
||||
|
||||
// Find the interface name for this line.
|
||||
for (iface = line; *iface == ' '; iface++)
|
||||
; // (skip initial spaces)
|
||||
for (pos = iface; *pos != ':' && *pos != 0; pos++)
|
||||
; // (move to next ':' or end of string)
|
||||
if (*pos == 0)
|
||||
continue; // (was not ':')
|
||||
*pos = 0;
|
||||
|
||||
// Now iface points to a null-terminated string containing the
|
||||
// interface name for this particular line.
|
||||
deviceBox->insertItem( iface );
|
||||
}
|
||||
fclose(fd);
|
||||
}
|
||||
#endif
|
||||
deviceBox->setCurrentText(defaultDevice);
|
||||
|
||||
connect(deviceBox, SIGNAL(textChanged(const QString&)),
|
||||
this, SLOT(updateDevice(const QString&)));
|
||||
}
|
||||
|
||||
const QString& DeviceDialog::getDevice() const {
|
||||
return device;
|
||||
}
|
||||
|
||||
void DeviceDialog::updateDevice(const QString& text) {
|
||||
device = text;
|
||||
}
|
||||
|
||||
#include "devicedialog.moc"
|
@ -0,0 +1,51 @@
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* KNetLoad is copyright (c) 1999-2000, Markus Gustavsson *
|
||||
* (c) 2002, Ben Burton *
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __DEVICEDIALOG_H
|
||||
#define __DEVICEDIALOG_H
|
||||
|
||||
#include <kdialogbase.h>
|
||||
|
||||
/**
|
||||
* A dialog used to select a custom network device to monitor.
|
||||
* The device is specified by its interface name.
|
||||
*/
|
||||
class DeviceDialog : public KDialogBase {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
DeviceDialog(const QString& defaultDevice, QWidget* parent);
|
||||
|
||||
/**
|
||||
* Returns the device currently selected in the dialog.
|
||||
* This is valid after the dialog has closed, though the string
|
||||
* itself will be destroyed when this object is deleted.
|
||||
*/
|
||||
const QString& getDevice() const;
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* Updates the device variable to reflect the latest changes in
|
||||
* the device combo box.
|
||||
*/
|
||||
virtual void updateDevice(const QString&);
|
||||
|
||||
private:
|
||||
QString device;
|
||||
/**< The device currently selected in the device combo box. */
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,63 @@
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* KCPULoad and KNetLoad are copyright (c) 1999-2000, Markus Gustavsson *
|
||||
* (c) 2002, Ben Burton *
|
||||
* *
|
||||
* 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 "icontoggleaction.h"
|
||||
|
||||
IconToggleAction::IconToggleAction(
|
||||
const QString& useTextUnchecked, const QString& useIconUnchecked,
|
||||
const QString& useTextChecked, const QString& useIconChecked,
|
||||
const KShortcut& cut, const QObject* receiver, const char* slot,
|
||||
QObject* parent, const char* name) :
|
||||
KToggleAction(useTextUnchecked, useIconUnchecked, cut, receiver,
|
||||
slot, parent, name),
|
||||
textChecked(useTextChecked), textUnchecked(useTextUnchecked),
|
||||
iconChecked(useIconChecked), iconUnchecked(useIconUnchecked) {
|
||||
}
|
||||
|
||||
IconToggleAction::IconToggleAction(const QString& useText,
|
||||
const QString& useIconUnchecked, const QString& useIconChecked,
|
||||
const KShortcut& cut, const QObject* receiver, const char* slot,
|
||||
QObject* parent, const char* name) :
|
||||
KToggleAction(useText, useIconUnchecked, cut, receiver,
|
||||
slot, parent, name),
|
||||