summaryrefslogtreecommitdiffstats
path: root/src/qalculatepreferencesdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qalculatepreferencesdialog.cpp')
-rw-r--r--src/qalculatepreferencesdialog.cpp107
1 files changed, 0 insertions, 107 deletions
diff --git a/src/qalculatepreferencesdialog.cpp b/src/qalculatepreferencesdialog.cpp
index e23be93..e6c4f70 100644
--- a/src/qalculatepreferencesdialog.cpp
+++ b/src/qalculatepreferencesdialog.cpp
@@ -26,15 +26,8 @@
#include <tqlabel.h>
#include <tqradiobutton.h>
#include <tqtooltip.h>
-#include <tdeversion.h>
-#if TDE_VERSION_MAJOR > 3 || TDE_VERSION_MINOR > 1
#include <tdefontrequester.h>
-#endif
-#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2
-#include <tqtabwidget.h>
-#else
#include <ktabwidget.h>
-#endif
#include <tqpushbutton.h>
#include <tqfont.h>
#include <tqpushbutton.h>
@@ -56,101 +49,9 @@ extern TQColor status_warning_color;
extern int use_icon_buttons;
extern bool rpn_keypad_only;
-#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2
-#include <tdefontdialog.h>
-
-class TDEFontRequester : public TQWidget
-{
- TQ_OBJECT
-
- public:
-
- TDEFontRequester( TQWidget *parent=0L, const char *name=0L,
- bool onlyFixed=false );
-
- TQFont font() const { return m_selFont; }
- virtual void setFont( const TQFont &font, bool onlyFixed=false );
-
- protected:
-
- void displaySampleText();
-
- protected slots:
-
- virtual void buttonClicked();
-
- protected:
-
- bool m_onlyFixed;
- TQString m_sampleText, m_title;
- TQLabel *m_sampleLabel;
- TQPushButton *m_button;
- TQFont m_selFont;
-
-};
-
-
-TDEFontRequester::TDEFontRequester( TQWidget *parent, const char *name,
- bool onlyFixed ) : TQWidget( parent, name ),
- m_onlyFixed( onlyFixed )
-{
- TQHBoxLayout *layout = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
-
- m_sampleLabel = new TQLabel( this, "m_sampleLabel" );
- m_button = new TQPushButton( i18n( "Choose..." ), this, "m_button" );
-
- m_sampleLabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
- setFocusProxy( m_button );
-
- layout->addWidget( m_sampleLabel, 1 );
- layout->addWidget( m_button );
-
- connect( m_button, TQ_SIGNAL( clicked() ), TQ_SLOT( buttonClicked() ) );
-
- displaySampleText();
-
-}
-
-void TDEFontRequester::setFont( const TQFont &font, bool onlyFixed )
-{
- m_selFont = font;
- m_onlyFixed = onlyFixed;
-
- displaySampleText();
-}
-void TDEFontRequester::buttonClicked()
-{
- int result = TDEFontDialog::getFont( m_selFont, m_onlyFixed, parentWidget() );
-
- if ( result == KDialog::Accepted )
- {
- displaySampleText();
- }
-}
-
-void TDEFontRequester::displaySampleText()
-{
- m_sampleLabel->setFont( m_selFont );
-
- int size = m_selFont.pointSize();
- if(size == -1)
- size = m_selFont.pixelSize();
-
- if ( m_sampleText.isEmpty() )
- m_sampleLabel->setText( TQString( "%1 %2" ).arg( m_selFont.family() )
- .arg( size ) );
- else
- m_sampleLabel->setText( m_sampleText );
-}
-#endif
-
QalculatePreferencesDialog::QalculatePreferencesDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Preferences"), Ok | Apply | Cancel, Ok, false) {
-#if TDE_VERSION_MAJOR < 4 && TDE_VERSION_MINOR < 2
- TQTabWidget *tabs = new TQTabWidget(this);
-#else
TQTabWidget *tabs = new KTabWidget(this);
-#endif
setMainWidget(tabs);
TQWidget *page1 = new TQWidget(this);
TQWidget *page2 = new TQWidget(this);
@@ -241,18 +142,10 @@ QalculatePreferencesDialog::QalculatePreferencesDialog(TQWidget *parent, const c
vbox->addWidget(statusFontEdit);
grid = new TQGridLayout(vbox);
grid->addWidget(new TQLabel(i18n("Status error color:"), page2), 0, 0);
-#if TDE_VERSION_MAJOR == 3 && TDE_VERSION_MINOR < 1
- statusErrorColorButton = new KColorButton(page2);
-#else
statusErrorColorButton = new KColorButton("red", "red", page2);
-#endif
grid->addWidget(statusErrorColorButton, 0, 1);
grid->addWidget(new TQLabel(i18n("Status warning color:"), page2), 1, 0);
-#if TDE_VERSION_MAJOR == 3 && TDE_VERSION_MINOR < 1
- statusWarningColorButton = new KColorButton(page2);
-#else
statusWarningColorButton = new KColorButton("blue", "blue", page2);
-#endif
grid->addWidget(statusWarningColorButton, 1, 1);
vbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));