kstars
imagereductiondlg.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <qlistview.h>
00019 #include <qpushbutton.h>
00020
00021 #include <kurl.h>
00022 #include <kfiledialog.h>
00023 #include <klocale.h>
00024
00025 #include "imagereductiondlg.h"
00026
00027 ImageReductionDlg::ImageReductionDlg(QWidget * parent, const char * name) : imageReductionUI(parent, name)
00028 {
00029 connect(darkAddB, SIGNAL(clicked()), this, SLOT(addDarkFile()));
00030 connect(flatAddB, SIGNAL(clicked()), this, SLOT(addFlatFile()));
00031 connect(darkRemoveB, SIGNAL(clicked()), this, SLOT(removeDarkFile()));
00032 connect(flatRemoveB, SIGNAL(clicked()), this, SLOT(removeFlatFile()));
00033 connect(darkDetailsB, SIGNAL(clicked()), this, SLOT(detailsDarkFile()));
00034 connect(flatDetailsB, SIGNAL(clicked()), this, SLOT(detailsFlatFile()));
00035 connect(darkflatAddB, SIGNAL(clicked()), this, SLOT(addDarkFlatFile()));
00036 connect(darkflatRemoveB, SIGNAL(clicked()), this, SLOT(removeDarkFlatFile()));
00037 connect(darkflatDetailsB, SIGNAL(clicked()), this, SLOT(detailsDarkFlatFile()));
00038
00039 darkListView->setSorting(-1);
00040 flatListView->setSorting(-1);
00041 darkflatListView->setSorting(-1);
00042
00043 }
00044
00045 ImageReductionDlg::~ImageReductionDlg()
00046 {
00047
00048
00049
00050
00051 }
00052
00053 void ImageReductionDlg::addDarkFile()
00054 {
00055 KURL::List fileURLs = KFileDialog::getOpenURLs( QString::null, "*.fits *.fit *.fts|Flexible Image Transport System", 0, i18n("Dark Frames"));
00056
00057 const int limit = (int) fileURLs.size();
00058 for (int i=0; i < limit ; ++i)
00059 new QListViewItem( darkListView, fileURLs[i].path());
00060
00061 darkRemoveB->setEnabled(true);
00062 darkDetailsB->setEnabled(true);
00063
00064 }
00065
00066 void ImageReductionDlg::addFlatFile()
00067 {
00068 KURL::List fileURLs = KFileDialog::getOpenURLs( QString::null, "*.fits *.fit *.fts|Flexible Image Transport System", 0, i18n("Flat Frames"));
00069
00070 const int limit = (int) fileURLs.size();
00071
00072 for (int i=0; i < limit; ++i)
00073 new QListViewItem( flatListView, fileURLs[i].path());
00074
00075 flatRemoveB->setEnabled(true);
00076 flatDetailsB->setEnabled(true);
00077
00078 }
00079
00080 void ImageReductionDlg::addDarkFlatFile()
00081 {
00082 KURL::List fileURLs = KFileDialog::getOpenURLs( QString::null, "*.fits *.fit *.fts|Flexible Image Transport System", 0, i18n("Dark Flat Frames"));
00083
00084 const int limit = (int) fileURLs.size();
00085 for (int i=0; i < limit; ++i)
00086 new QListViewItem( darkflatListView, fileURLs[i].path());
00087
00088 darkflatRemoveB->setEnabled(true);
00089 darkflatDetailsB->setEnabled(true);
00090
00091
00092 }
00093
00094 void ImageReductionDlg::removeDarkFile()
00095 {
00096
00097 if (darkListView->currentItem() == NULL)
00098 return;
00099
00100 darkListView->takeItem(darkListView->currentItem());
00101
00102 }
00103
00104 void ImageReductionDlg::removeDarkFlatFile()
00105 {
00106
00107 if (darkflatListView->currentItem() == NULL)
00108 return;
00109
00110 darkflatListView->takeItem(darkflatListView->currentItem());
00111
00112 }
00113
00114 void ImageReductionDlg::removeFlatFile()
00115 {
00116
00117 if (flatListView->currentItem() == NULL)
00118 return;
00119
00120 flatListView->takeItem(flatListView->currentItem());
00121
00122 }
00123
00124 void ImageReductionDlg::detailsDarkFile()
00125 {
00126
00127
00128
00129
00130 }
00131
00132 void ImageReductionDlg::detailsFlatFile()
00133 {
00134
00135
00136
00137
00138
00139 }
00140
00141 void ImageReductionDlg::detailsDarkFlatFile()
00142 {
00143
00144
00145
00146
00147
00148 }
00149
00150 #include "imagereductiondlg.moc"