9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
The bash below executes and does find all the .bam files in each R_2019 folder. However set -x shows that the .bam extension only gets removed from one .bam file in each folder (appears to be the last in each). Why is it not removing the extension from each (this is $SAMPLE)? Thank you :).
set... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. UNIX for Beginners Questions & Answers
Sample code from apple's xnu code:
struct radix_node {
struct radix_mask *rn_mklist; /* list of masks contained in subtree */
struct radix_node *rn_parent; /* parent */
short rn_bit; /* bit offset; -1-index(netmask) */
char rn_bmask; /* node: mask for bit test*/
u_char rn_flags; /*... (5 Replies)
Discussion started by: cmdcmd
5 Replies
3. Post Here to Contact Site Administrators and Moderators
In this thread: /shell-programming-and-scripting/255687-organizing-text-file-capital-names-capital-word-capital-word.html (sorry i cant use links)
that is not an example, those are real students names with real student login id's for the college i am attending and i am on that list. Please... (3 Replies)
Discussion started by: throwawayacc
3 Replies
4. Red Hat
Hi guys,
I need to write a script so that when i execute the "rm" command, the file mentioned need to be copied to other folder and then be deleted. this should be done in back ground. can you please help me out?? (1 Reply)
Discussion started by: rajeshb6
1 Replies
5. Shell Programming and Scripting
Hi all,
I want to remove the remove bracket sign ( ) and put in the separate column I also want to remove the repeated entry like in first row in below input (PA156) is repeated
ESR1 (PA156) leflunomide (PA450192) (PA156) leflunomide (PA450192)
CHST3 (PA26503) docetaxel... (2 Replies)
Discussion started by: manigrover
2 Replies
6. Shell Programming and Scripting
not sure what is this but any can help me delete this ^I
cat -A file.txt
CLAS^I^I|890^I|7,10,12,341,305,308,29,54^M$
LCLS^I^I|891^I|7,10,12,341,305,308,29,54^M$
MURB^I^I|892^I|7,10,12,341,305,308,29,54^M$
LATI^I^I|893^I|7,10,12,341,305,308,29,54^M$
i want to remove the ^I^I... (2 Replies)
Discussion started by: posner
2 Replies
7. Shell Programming and Scripting
My file has varied width references:
width=10%
style=width:5%
width:1506%
width:99.58%
so I'm trying clear all the width calls with one procedure:
's/width= *%//' and 's/width=*%//'but neither is working. (6 Replies)
Discussion started by: dba_frog
6 Replies
8. UNIX for Dummies Questions & Answers
Excuse my ignorance, being relatively new at this stuff..
Is it possible that Unix could operate as a backbone server provider to a campus LAN? If so, could UNIX act as the gateway server to the WAN, but provide internet connection to other sub-LAN's which used another bus protocol? (say via... (1 Reply)
Discussion started by: paulmnz
1 Replies
9. UNIX for Dummies Questions & Answers
hi, i am on aix. i used smitty to remove a user..
but then found that its directory still exists....
so i have to remove the directory manually...
am i doing it the right way? (2 Replies)
Discussion started by: yls177
2 Replies
QwtScaleDraw(3) Qwt User's Guide QwtScaleDraw(3)
NAME
QwtScaleDraw -
A class for drawing scales.
SYNOPSIS
#include <qwt_scale_draw.h>
Inherits QwtAbstractScaleDraw.
Public Types
enum Alignment { BottomScale, TopScale, LeftScale, RightScale }
enum ScaleComponent { Backbone = 1, Ticks = 2, Labels = 4 }
Public Member Functions
Alignment alignment () const
QRect boundingLabelRect (const QFont &, double val) const
virtual void draw (QPainter *, const QPalette &) const
void enableComponent (ScaleComponent, bool enable=true)
virtual int extent (const QPen &, const QFont &) const
void getBorderDistHint (const QFont &, int &start, int &end) const
bool hasComponent (ScaleComponent) const
virtual QwtText label (double) const
Qt::Alignment labelAlignment () const
QPoint labelPosition (double val) const
QRect labelRect (const QFont &, double val) const
double labelRotation () const
QSize labelSize (const QFont &, double val) const
int length () const
int majTickLength () const
const QwtScaleMap & map () const
int maxLabelHeight (const QFont &) const
int maxLabelWidth (const QFont &) const
int minimumExtent () const
int minLabelDist (const QFont &) const
int minLength (const QPen &, const QFont &) const
void move (int x, int y)
void move (const QPoint &)
QwtScaleDraw & operator= (const QwtScaleDraw &other)
Qt::Orientation orientation () const
QPoint pos () const
QwtScaleDraw (const QwtScaleDraw &)
QwtScaleDraw ()
const QwtScaleDiv & scaleDiv () const
QwtScaleMap & scaleMap ()
void setAlignment (Alignment)
void setLabelAlignment (Qt::Alignment)
void setLabelRotation (double rotation)
void setLength (int length)
void setMinimumExtent (int)
void setScaleDiv (const QwtScaleDiv &s)
void setSpacing (int margin)
void setTickLength (QwtScaleDiv::TickType, int length)
void setTransformation (QwtScaleTransformation *)
int spacing () const
int tickLength (QwtScaleDiv::TickType) const
virtual ~QwtScaleDraw ()
Protected Member Functions
virtual void drawBackbone (QPainter *p) const
virtual void drawLabel (QPainter *p, double val) const
virtual void drawTick (QPainter *p, double val, int len) const
void invalidateCache ()
QMatrix labelMatrix (const QPoint &, const QSize &) const
const QwtText & tickLabel (const QFont &, double value) const
Detailed Description
A class for drawing scales.
QwtScaleDraw can be used to draw linear or logarithmic scales. A scale has a position, an alignment and a length, which can be specified .
The labels can be rotated and aligned to the ticks using setLabelRotation() and setLabelAlignment().
After a scale division has been specified as a QwtScaleDiv object using QwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s), the scale
can be drawn with the QwtAbstractScaleDraw::draw() member.
Member Enumeration Documentation
enum QwtScaleDraw::Alignment Alignment of the scale draw
See also:
setAlignment(), alignment()
enum QwtAbstractScaleDraw::ScaleComponent [inherited] Components of a scale
o Backbone
o Ticks
o Labels
See also:
enableComponent(), hasComponent
Constructor & Destructor Documentation
QwtScaleDraw::QwtScaleDraw ()
Constructor. The range of the scale is initialized to [0, 100], The position is at (0, 0) with a length of 100. The orientation is
QwtAbstractScaleDraw::Bottom.
QwtScaleDraw::QwtScaleDraw (const QwtScaleDraw &other)
Copy constructor.
QwtScaleDraw::~QwtScaleDraw () [virtual]
Destructor.
Member Function Documentation
QwtScaleDraw::Alignment QwtScaleDraw::alignment () const Return alignment of the scale
See also:
setAlignment()
QRect QwtScaleDraw::boundingLabelRect (const QFont &font, doublevalue) const Find the bounding rect for the label. The coordinates of the rect
are absolute coordinates ( calculated from pos() ). in direction of the tick.
Parameters:
font Font used for painting
value Value
See also:
labelRect()
void QwtAbstractScaleDraw::draw (QPainter *painter, const QPalette &palette) const [virtual, inherited]
Draw the scale. Parameters:
painter The painter
palette Palette, text color is used for the labels, foreground color for ticks and backbone
void QwtScaleDraw::drawBackbone (QPainter *painter) const [protected, virtual] Draws the baseline of the scale
Parameters:
painter Painter
See also:
drawTick(), drawLabel()
Implements QwtAbstractScaleDraw.
void QwtScaleDraw::drawLabel (QPainter *painter, doublevalue) const [protected, virtual] Draws the label for a major scale tick
Parameters:
painter Painter
value Value
See also:
drawTick(), drawBackbone(), boundingLabelRect()
Implements QwtAbstractScaleDraw.
void QwtScaleDraw::drawTick (QPainter *painter, doublevalue, intlen) const [protected, virtual] Draw a tick
Parameters:
painter Painter
value Value of the tick
len Length of the tick
See also:
drawBackbone(), drawLabel()
Implements QwtAbstractScaleDraw.
void QwtAbstractScaleDraw::enableComponent (ScaleComponentcomponent, boolenable = true) [inherited] En/Disable a component of the scale
Parameters:
component Scale component
enable On/Off
See also:
hasComponent()
int QwtScaleDraw::extent (const QPen &pen, const QFont &font) const [virtual] Calculate the width/height that is needed for a
vertical/horizontal scale.
The extent is calculated from the pen width of the backbone, the major tick length, the spacing and the maximum width/height of the labels.
Parameters:
pen Pen that is used for painting backbone and ticks
font Font used for painting the labels
See also:
minLength()
Implements QwtAbstractScaleDraw.
void QwtScaleDraw::getBorderDistHint (const QFont &font, int &start, int &end) const
Determine the minimum border distance. This member function returns the minimum space needed to draw the mark labels at the scale's
endpoints.
Parameters:
font Font
start Start border distance
end End border distance
bool QwtAbstractScaleDraw::hasComponent (ScaleComponentcomponent) const [inherited] Check if a component is enabled
See also:
enableComponent()
void QwtAbstractScaleDraw::invalidateCache () [protected, inherited] Invalidate the cache used by QwtAbstractScaleDraw::tickLabel
The cache is invalidated, when a new QwtScaleDiv is set. If the labels need to be changed. while the same QwtScaleDiv is set,
QwtAbstractScaleDraw::invalidateCache needs to be called manually.
QwtText QwtAbstractScaleDraw::label (doublevalue) const [virtual, inherited]
Convert a value into its representing label. The value is converted to a plain text using QLocale::system().toString(value). This method is
often overloaded by applications to have individual labels.
Parameters:
value Value
Returns:
Label string.
Reimplemented in QwtDialScaleDraw.
Qt::Alignment QwtScaleDraw::labelAlignment () const Returns:
the label flags
See also:
setLabelAlignment(), labelRotation()
QMatrix QwtScaleDraw::labelMatrix (const QPoint &pos, const QSize &size) const [protected] Calculate the matrix that is needed to paint a label
depending on its alignment and rotation.
Parameters:
pos Position where to paint the label
size Size of the label
See also:
setLabelAlignment(), setLabelRotation()
QPoint QwtScaleDraw::labelPosition (doublevalue) const Find the position, where to paint a label
The position has a distance of majTickLength() + spacing() + 1 from the backbone. The direction depends on the alignment()
Parameters:
value Value
QRect QwtScaleDraw::labelRect (const QFont &font, doublevalue) const Find the bounding rect for the label. The coordinates of the rect are
relative to spacing + ticklength from the backbone in direction of the tick.
Parameters:
font Font used for painting
value Value
double QwtScaleDraw::labelRotation () const Returns:
the label rotation
See also:
setLabelRotation(), labelAlignment()
QSize QwtScaleDraw::labelSize (const QFont &font, doublevalue) const Calculate the size that is needed to draw a label
Parameters:
font Label font
value Value
int QwtScaleDraw::length () const Returns:
the length of the backbone
See also:
setLength(), pos()
int QwtAbstractScaleDraw::majTickLength () const [inherited] The same as QwtAbstractScaleDraw::tickLength(QwtScaleDiv::MajorTick).
const QwtScaleMap & QwtAbstractScaleDraw::map () const [inherited] Returns:
Map how to translate between scale and pixel values
int QwtScaleDraw::maxLabelHeight (const QFont &font) const Parameters:
font Font
Returns:
the maximum height of a label
int QwtScaleDraw::maxLabelWidth (const QFont &font) const Parameters:
font Font
Returns:
the maximum width of a label
int QwtAbstractScaleDraw::minimumExtent () const [inherited] Get the minimum extent
See also:
extent(), setMinimumExtent()
int QwtScaleDraw::minLabelDist (const QFont &font) const Determine the minimum distance between two labels, that is necessary that the texts
don't overlap.
Parameters:
font Font
Returns:
The maximum width of a label
See also:
getBorderDistHint()
int QwtScaleDraw::minLength (const QPen &pen, const QFont &font) const Calculate the minimum length that is needed to draw the scale
Parameters:
pen Pen that is used for painting backbone and ticks
font Font used for painting the labels
See also:
extent()
void QwtScaleDraw::move (intx, inty) [inline] Move the position of the scale
See also:
move(const QPoint &)
void QwtScaleDraw::move (const QPoint &pos)
Move the position of the scale. The meaning of the parameter pos depends on the alignment:
QwtScaleDraw::LeftScale
The origin is the topmost point of the backbone. The backbone is a vertical line. Scale marks and labels are drawn at the left of the
backbone.
QwtScaleDraw::RightScale
The origin is the topmost point of the backbone. The backbone is a vertical line. Scale marks and labels are drawn at the right of the
backbone.
QwtScaleDraw::TopScale
The origin is the leftmost point of the backbone. The backbone is a horizontal line. Scale marks and labels are drawn above the
backbone.
QwtScaleDraw::BottomScale
The origin is the leftmost point of the backbone. The backbone is a horizontal line Scale marks and labels are drawn below the
backbone.
Parameters:
pos Origin of the scale
See also:
pos(), setLength()
QwtScaleDraw & QwtScaleDraw::operator= (const QwtScaleDraw &other)
Assignment operator.
Qt::Orientation QwtScaleDraw::orientation () const Return the orientation
TopScale, BottomScale are horizontal (Qt::Horizontal) scales, LeftScale, RightScale are vertical (Qt::Vertical) scales.
See also:
alignment()
QPoint QwtScaleDraw::pos () const Returns:
Origin of the scale
See also:
move(), length()
const QwtScaleDiv & QwtAbstractScaleDraw::scaleDiv () const [inherited] Returns:
scale division
QwtScaleMap & QwtAbstractScaleDraw::scaleMap () [inherited] Returns:
Map how to translate between scale and pixel values
void QwtScaleDraw::setAlignment (Alignmentalign) Set the alignment of the scale
The default alignment is QwtScaleDraw::BottomScale
See also:
alignment()
void QwtScaleDraw::setLabelAlignment (Qt::Alignmentalignment)
Change the label flags. Labels are aligned to the point ticklength + spacing away from the backbone.
The alignment is relative to the orientation of the label text. In case of an flags of 0 the label will be aligned depending on the
orientation of the scale:
QwtScaleDraw::TopScale: Qt::AlignHCenter | Qt::AlignTop
QwtScaleDraw::BottomScale: Qt::AlignHCenter | Qt::AlignBottom
QwtScaleDraw::LeftScale: Qt::AlignLeft | Qt::AlignVCenter
QwtScaleDraw::RightScale: Qt::AlignRight | Qt::AlignVCenter
Changing the alignment is often necessary for rotated labels.
Parameters:
alignment Or'd Qt::AlignmentFlags <see qnamespace.h>
See also:
setLabelRotation(), labelRotation(), labelAlignment()
Warning:
The various alignments might be confusing. The alignment of the label is not the alignment of the scale and is not the alignment of the
flags (QwtText::flags()) returned from QwtAbstractScaleDraw::label().
void QwtScaleDraw::setLabelRotation (doublerotation) Rotate all labels.
When changing the rotation, it might be necessary to adjust the label flags too. Finding a useful combination is often the result of try
and error.
Parameters:
rotation Angle in degrees. When changing the label rotation, the label flags often needs to be adjusted too.
See also:
setLabelAlignment(), labelRotation(), labelAlignment().
void QwtScaleDraw::setLength (intlength) Set the length of the backbone.
The length doesn't include the space needed for overlapping labels.
See also:
move(), minLabelDist()
void QwtAbstractScaleDraw::setMinimumExtent (intminExtent) [inherited]
Set a minimum for the extent. The extent is calculated from the coomponents of the scale draw. In situations, where the labels are changing
and the layout depends on the extent (f.e scrolling a scale), setting an upper limit as minimum extent will avoid jumps of the layout.
Parameters:
minExtent Minimum extent
See also:
extent(), minimumExtent()
void QwtAbstractScaleDraw::setScaleDiv (const QwtScaleDiv &sd) [inherited] Change the scale division
Parameters:
sd New scale division
void QwtAbstractScaleDraw::setSpacing (intspacing) [inherited]
Set the spacing between tick and labels. The spacing is the distance between ticks and labels. The default spacing is 4 pixels.
Parameters:
spacing Spacing
See also:
spacing()
void QwtAbstractScaleDraw::setTickLength (QwtScaleDiv::TickTypetickType, intlength) [inherited] Set the length of the ticks
Parameters:
tickType Tick type
length New length
Warning:
the length is limited to [0..1000]
void QwtAbstractScaleDraw::setTransformation (QwtScaleTransformation *transformation) [inherited] Change the transformation of the scale
Parameters:
transformation New scale transformation
int QwtAbstractScaleDraw::spacing () const [inherited]
Get the spacing. The spacing is the distance between ticks and labels. The default spacing is 4 pixels.
See also:
setSpacing()
const QwtText & QwtAbstractScaleDraw::tickLabel (const QFont &font, doublevalue) const [protected, inherited]
Convert a value into its representing label and cache it. The conversion between value and label is called very often in the layout and
painting code. Unfortunately the calculation of the label sizes might be slow (really slow for rich text in Qt4), so it's necessary to
cache the labels.
Parameters:
font Font
value Value
Returns:
Tick label
int QwtAbstractScaleDraw::tickLength (QwtScaleDiv::TickTypetickType) const [inherited] Return the length of the ticks
See also:
setTickLength(), majTickLength()
Author
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Version 5.2.2 Mon Aug 1 2011 QwtScaleDraw(3)