/**********************************************************************

	--- Dlgedit generated file ---

	File: VisualOptions.cpp
	Last generated: Sun Oct 26 15:16:54 1997

 *********************************************************************/
#include <qdir.h>
#include "VisualOptions.h"
#include "VisualOptions.moc"
#include "VisualOptionsData.moc"
#include "ircapp.h"
#include <kmsgbox.h>
#include <qfiledlg.h>

#define Inherited VisualOptionsData

VisualOptions::VisualOptions
(
	QWidget* parent,
	const char* name
)
	:
	Inherited( parent, name )
{
//    wallpaperEdit->setText(Settings::wallpaperFile);
    //  wallpaperCheckBox->setChecked(Settings::useWallpaper);
    createDetachedCheckBox->setChecked(Settings::createDetached);
    for (int i = 0; i < nickCompletionHighlight->count(); i++)
    {
        if (QString(nickCompletionHighlight->text(i)) == Settings::nickCompletionExtra)
            nickCompletionHighlight->setCurrentItem(i);
    }
}


void VisualOptions::SaveAll( )
{
//    Settings::useWallpaper = wallpaperCheckBox->isChecked();
    //     Settings::wallpaperFile = wallpaperEdit->text();
      Settings::nickCompletionExtra = nickCompletionHighlight->currentText();
    Settings::createDetached = createDetachedCheckBox->isChecked();
}

void VisualOptions::slotBrowseWallpaperFile()
{/*
    QString f;
    QString str = wallpaperEdit->text();
    int i = str.findRev("/", str.size()-1);
    if (i == -1)
        f = QFileDialog::getOpenFileName(IrcApp::GetFile(""), 0, this);
    else
    {
        QString fileDir = str.left(i);
        f = QFileDialog::getOpenFileName(fileDir, 0, this);
    }

    wallpaperEdit->setText(f);        */
}

void VisualOptions::slotBrowseTitleBarPixmap()
{/*
    QString f;
    QString str = titleBarPixmapEdit->text();
    int i = str.findRev("/", str.size()-1);
    if (i == -1)
        f = QFileDialog::getOpenFileName(IrcApp::GetFile(""), 0, this);
    else
    {
        QString fileDir = str.left(i);
        f = QFileDialog::getOpenFileName(fileDir, 0, this);
    }

    titleBarPixmapEdit->setText(f);        */
}

VisualOptions::~VisualOptions()
{
}
