1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
/*
* vi:ts=4:sw=4:
*
* Project : "Linux Explorer"
* Copyright 1996. All Rights Reserved.
*
* $RCSfile: data_win.cpp,v $
*
* $Revision: 1.4 $
*
* $Author: ruben $
*
* $Locker: $
*
* $State: Exp $
*
*
* COPYRIGHT
* =========
*
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* OVERVIEW
* ========
*
* $Log: data_win.cpp,v $
* Revision 1.4 1997/06/09 12:59:23 ruben
* switched rcs commands again I think...
* compiled with -Wall -Werror, fixed bugs and potential bugs
* fixed Mister Data bugs
*
// Revision 1.3 1997/05/27 09:10:46 ruben
// some indentstuff and reworked include strategy
//
// Revision 1.3 1997/05/27 09:10:46 ruben
// some indentstuff and reworked include strategy
//
* Revision 1.2 1997/04/06 21:18:16 ruben
* changed some signals to 'send' const char* instead of just char*
*
* Revision 1.1 1997/03/28 17:04:14 ruben
* Initial revision
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif // HAVE_CONFIG_H
#ifdef USE_RCS_ID
static const char rcs_id[] = "$Id: data_win.cpp,v 1.4 1997/06/09 12:59:23 ruben Exp $";
#endif /* USE_RCS_ID */
#include "data_win.h"
char tempo_stringo[PATH_MAX]; // string used by goto_dir ()
char mouse_locked = FALSE; // this will probably not work
// under multi-thread
char multiple_select=FALSE;
/*---------------------------------------------------------------------------*/
void draw_rect (QPainter *painter,
int x1,int y1,
int x2,int y2)
{
painter->drawLine (x1,y1,x1,y2);
painter->drawLine (x1,y2,x2,y2);
painter->drawLine (x2,y2,x2,y1);
painter->drawLine (x2,y1,x1,y1);
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
UpDownScroll::UpDownScroll(QWidget * parent, int *change_val):QScrollBar(0, 0, 1, BUTTON_HEIGHT, 0, QScrollBar::Vertical, parent, "vert")
{
connect(this, SIGNAL(valueChanged(int)),
SLOT (scrollBarValueChanged(int)));
val_to_change = change_val;
}
/*---------------------------------------------------------------------------*/
LeftRightScroll::LeftRightScroll(QWidget * parent, int *change_val):QScrollBar(0, 0, 1, BUTTON_HEIGHT, 0, QScrollBar::Horizontal, parent, "hor")
{
connect(this, SIGNAL(valueChanged(int)),
SLOT (scrollBarValueChanged(int)));
val_to_change = change_val;
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
void UpDownScroll::scrollBarValueChanged(int new_value)
{
*val_to_change = (-new_value);
move_widget->update();
}
/*---------------------------------------------------------------------------*/
void UpDownScroll::set_parent(QWidget * new_parent)
{
move_widget = new_parent;
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
void LeftRightScroll::scrollBarValueChanged(int new_value)
{
*val_to_change = (-new_value);
move_widget->update();
}
/*---------------------------------------------------------------------------*/
void LeftRightScroll::set_parent(QWidget * new_parent)
{
move_widget = new_parent;
}
/*---------------------------------------------------------------------------*/
|