@ -99,7 +99,7 @@ TQValidator::State
ExtDateValidator : : date ( const TQString & text , ExtDate & ed ) const
{
//FIXME: Can't uncomment unless ExtDate is adopted by KDE
//ExtDate tmp = K Global::locale()->readDate(text);
//ExtDate tmp = TDE Global::locale()->readDate(text);
ExtDate tmp = ExtDate : : fromString ( text ) ;
if ( ! tmp . isNull ( ) )
@ -131,7 +131,7 @@ ExtDateTable::ExtDateTable(TQWidget *parent, ExtDate date_, const char* name, WF
setNumCols ( 7 ) ; // 7 days a week
setHScrollBarMode ( AlwaysOff ) ;
setVScrollBarMode ( AlwaysOff ) ;
viewport ( ) - > setEraseColor ( K GlobalSettings: : baseColor ( ) ) ;
viewport ( ) - > setEraseColor ( TDE GlobalSettings: : baseColor ( ) ) ;
setDate ( date_ ) ; // this initializes firstday, numdays, numDaysPrevMonth
}
@ -143,8 +143,8 @@ ExtDateTable::~ExtDateTable()
int ExtDateTable : : posFromDate ( const ExtDate & dt )
{
//FIXME: Can't uncomment unless ExtDate is added to tdelibs
// const ExtCalendarSystem * calendar = K Global::locale()->calendar();
// const int firstWeekDay = K Global::locale()->weekStartDay();
// const ExtCalendarSystem * calendar = TDE Global::locale()->calendar();
// const int firstWeekDay = TDE Global::locale()->weekStartDay();
const int firstWeekDay = 7 ;
@ -161,8 +161,8 @@ ExtDate ExtDateTable::dateFromPos( int pos )
ExtDate pCellDate ;
//FIXME: Can't uncomment unless ExtDate is added to tdelibs
// const ExtCalendarSystem * calendar = K Global::locale()->calendar();
// int firstWeekDay = K Global::locale()->weekStartDay();
// const ExtCalendarSystem * calendar = TDE Global::locale()->calendar();
// int firstWeekDay = TDE Global::locale()->weekStartDay();
const int firstWeekDay = 7 ;
d - > calendar - > setYMD ( pCellDate , d - > calendar - > year ( date ) , d - > calendar - > month ( date ) , 1 ) ;
@ -180,8 +180,8 @@ void
ExtDateTable : : paintCell ( TQPainter * painter , int row , int col )
{
//FIXME: Can't uncomment unless ExtDate is added to tdelibs
// const ExtCalendarSystem * calendar = K Global::locale()->calendar();
// int firstWeekDay = K Global::locale()->weekStartDay();
// const ExtCalendarSystem * calendar = TDE Global::locale()->calendar();
// int firstWeekDay = TDE Global::locale()->weekStartDay();
const int firstWeekDay = 7 ;
TQRect rect ;
@ -189,7 +189,7 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col)
TQPen pen ;
int w = cellWidth ( ) ;
int h = cellHeight ( ) ;
TQFont font = K GlobalSettings: : generalFont ( ) ;
TQFont font = TDE GlobalSettings: : generalFont ( ) ;
// -----
if ( row = = 0 )
@ -205,8 +205,8 @@ ExtDateTable::paintCell(TQPainter *painter, int row, int col)
TQBrush brushTitle ( ) ;
TQBrush brushInvertTitle ( colorGroup ( ) . base ( ) ) ;
TQColor titleColor ( isEnabled ( ) ? ( K GlobalSettings: : activeTitleColor ( ) ) : ( K GlobalSettings: : inactiveTitleColor ( ) ) ) ;
TQColor textColor ( isEnabled ( ) ? ( K GlobalSettings: : activeTextColor ( ) ) : ( K GlobalSettings: : inactiveTextColor ( ) ) ) ;
TQColor titleColor ( isEnabled ( ) ? ( TDE GlobalSettings: : activeTitleColor ( ) ) : ( TDE GlobalSettings: : inactiveTitleColor ( ) ) ) ;
TQColor textColor ( isEnabled ( ) ? ( TDE GlobalSettings: : activeTextColor ( ) ) : ( TDE GlobalSettings: : inactiveTextColor ( ) ) ) ;
if ( ! normalday )
{
painter - > setPen ( textColor ) ;
@ -303,7 +303,7 @@ void
ExtDateTable : : keyPressEvent ( TQKeyEvent * e )
{
//FIXME: Can't uncomment unless ExtDate is added to tdelibs
// const ExtCalendarSystem * calendar = K Global::locale()->calendar();
// const ExtCalendarSystem * calendar = TDE Global::locale()->calendar();
ExtDate temp = date ;
@ -373,7 +373,7 @@ void
ExtDateTable : : setFontSize ( int size )
{
//FIXME: Can't uncomment unless ExtDate is added to tdelibs
// const ExtCalendarSystem * calendar = K Global::locale()->calendar();
// const ExtCalendarSystem * calendar = TDE Global::locale()->calendar();
int count ;
TQFontMetrics metrics ( fontMetrics ( ) ) ;
@ -454,7 +454,7 @@ ExtDateTable::contentsMousePressEvent(TQMouseEvent *e)
//FIXME: Uncomment the following line (and remove the one after it)
// if ExtDate is added to tdelibs
// menu->insertTitle( K Global::locale()->formatDate(clickedDate) );
// menu->insertTitle( TDE Global::locale()->formatDate(clickedDate) );
menu - > insertTitle ( clickedDate . toString ( ) ) ;
emit aboutToShowContextMenu ( menu , clickedDate ) ;
@ -482,7 +482,7 @@ ExtDateTable::setDate(const ExtDate& date_)
}
//FIXME: Can't uncomment the following unless ExtDate is moved to tdelibs
// const ExtCalendarSystem * calendar = K Global::locale()->calendar();
// const ExtCalendarSystem * calendar = TDE Global::locale()->calendar();
d - > calendar - > setYMD ( temp , d - > calendar - > year ( date ) , d - > calendar - > month ( date ) , 1 ) ;
//temp.setYMD(date.year(), date.month(), 1);
@ -572,7 +572,7 @@ ExtDateInternalWeekSelector::ExtDateInternalWeekSelector
{
TQFont font ;
// -----
font = K GlobalSettings: : generalFont ( ) ;
font = TDE GlobalSettings: : generalFont ( ) ;
setFont ( font ) ;
setFrameStyle ( TQFrame : : NoFrame ) ;
setValidator ( val ) ;
@ -643,14 +643,14 @@ ExtDateInternalMonthPicker::ExtDateInternalMonthPicker
result ( 0 ) // invalid
{
//FIXME: Can't uncomment the following unless ExtDate is moved to tdelibs
// ExtCalendarSystem *calendar = K Global::locale()->calendar();
// ExtCalendarSystem *calendar = TDE Global::locale()->calendar();
TQRect rect ;
TQFont font ;
// -----
activeCol = - 1 ;
activeRow = - 1 ;
font = K GlobalSettings: : generalFont ( ) ;
font = TDE GlobalSettings: : generalFont ( ) ;
setFont ( font ) ;
setHScrollBarMode ( AlwaysOff ) ;
setVScrollBarMode ( AlwaysOff ) ;
@ -661,7 +661,7 @@ ExtDateInternalMonthPicker::ExtDateInternalMonthPicker
setNumRows ( ( d - > calendar - > monthsInYear ( date ) + 2 ) / 3 ) ;
// enable to find drawing failures:
// setTableFlags(Tbl_clipCellPainting);
viewport ( ) - > setEraseColor ( K GlobalSettings: : baseColor ( ) ) ; // for consistency with the datepicker
viewport ( ) - > setEraseColor ( TDE GlobalSettings: : baseColor ( ) ) ; // for consistency with the datepicker
// ----- find the preferred size
// (this is slow, possibly, but unfortunately it is needed here):
TQFontMetrics metrics ( font ) ;
@ -692,7 +692,7 @@ ExtDateInternalMonthPicker::getResult() const
void
ExtDateInternalMonthPicker : : setupPainter ( TQPainter * p )
{
p - > setPen ( K GlobalSettings: : textColor ( ) ) ;
p - > setPen ( TDE GlobalSettings: : textColor ( ) ) ;
}
void
@ -819,7 +819,7 @@ ExtDateInternalYearSelector::ExtDateInternalYearSelector
{
TQFont font ;
// -----
font = K GlobalSettings: : generalFont ( ) ;
font = TDE GlobalSettings: : generalFont ( ) ;
setFont ( font ) ;
setFrameStyle ( TQFrame : : NoFrame ) ;
// set year limits (perhaps we should get rid of limits altogether)
@ -923,7 +923,7 @@ void
KPopupFrame : : popup ( const TQPoint & pos )
{
// Make sure the whole popup is visible.
TQRect d = K GlobalSettings: : desktopGeometry ( pos ) ;
TQRect d = TDE GlobalSettings: : desktopGeometry ( pos ) ;
int x = pos . x ( ) ;
int y = pos . y ( ) ;