#include <creaImageIOWxEditFieldsPanel.h>
#include <creaImageIOWxAttributeSelectionPanel.h>
#include <creaImageIOWxDescriptorPanel.h>
+#include <creaImageIOWxDumpPanel.h>
+#include <creaImageIOWxExportDlg.h>
using namespace crea;
// Icons
#endif
+#include <creaImageIOGimmick.h>
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
namespace creaImageIO
{
CreateIconList();
// Global sizer
- wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+ msizer = new wxBoxSizer(wxVERTICAL);
// Create the tool bar
CreateToolBar();
- sizer->Add( mToolBar, 0, wxGROW, 0);
+ msizer->Add( mToolBar, 0, wxGROW, 0);
// Split part below toolbar into notebook for views and panel
// for preview, messages...
// Bottom panel
mBottomPanel = new wxPanel(mSplitter,-1);
- wxBoxSizer *bottom_sizer = new wxBoxSizer(wxVERTICAL); //HORIZONTAL);
+ mbottom_sizer = new wxBoxSizer(wxVERTICAL); //HORIZONTAL);
// Previewer
mViewer->StartPlayer();
- bottom_sizer->Add(mViewer,1,wxGROW,1);
+ mbottom_sizer->Add(mViewer,1,wxGROW,1);
// mViewer->Show();
mText = new wxStaticText(mBottomPanel, wxID_ANY, wxT("Welcome to Gimmick!"));
- bottom_sizer->Add(mText,0,wxGROW,0);
+ mbottom_sizer->Add(mText,0,wxGROW,0);
- mBottomPanel->SetSizer(bottom_sizer);
+ mBottomPanel->SetSizer(mbottom_sizer);
// Splitting
int hsize = size.GetHeight();
mSplitter->SplitHorizontally( mNotebook, mBottomPanel,
top_minsize);
- sizer->Add( mSplitter, 1, wxGROW, 0);
+ msizer->Add( mSplitter, 1, wxGROW, 0);
mProgressDialog=0;
- SetSizer( sizer );
+ SetSizer( msizer );
SetAutoLayout(true);
Layout();
//mListener=new Listener();
GimmickDebugMessage(1,"WxGimmickView::~WxGimmickView"
<<std::endl);
delete mIcon;
+ delete mViewer;
//if(mListener->IsAlive()) { mListener->Delete(); }
}
//======================================================================
DisplayAddSummary();
}
mViewer->StartPlayer();
+ delete FD;
}
nb->AddPage( pacs, crea::std2wx("Connect to PACS") );
//Third page: CD/DVD Watch
- WxListenerPanel* cdWatch=new WxListenerPanel(nb,dial, this, mListener->IsPaused());
+ WxListenerPanel* cdWatch=new WxListenerPanel(nb,dial, this,true);//, mListener->IsPaused());
nb->AddPage( cdWatch, crea::std2wx("CD/DVD") );
//Fourth page: Selection of attributes to show
dial->ShowModal();
}
+ //========================================================================
+ void WxGimmickView::DumpTags(std::string i_filename)
+ {
+ WxDumpPanel* pan= new WxDumpPanel (this,i_filename);
+ pan->ShowModal();
+ }
+
+ //========================================================================
+ void WxGimmickView::ExportToStorage(const std::vector<std::string> i_filenames)
+ {
+ std::vector<std::string> storages;
+ Gimmick::TreeHandlerMapType::iterator it = mGimmick->GetTreeHandlerMap().begin();
+ for(;it != mGimmick->GetTreeHandlerMap().end(); it++)
+ {
+ storages.push_back(it->first);
+ }
+
+ WxExportDlg* exp= new WxExportDlg(this,storages);
+ if ( exp->ShowModal() ==ID_EXPORT_OK)
+ {
+ std::string storage = exp->GetStorage();
+ mProgressDialog =
+ new wxProgressDialog(_T("Adding file(s)"),
+ _T(""),
+ 1000,
+ this,
+ wxPD_ELAPSED_TIME |
+ // wxPD_ESTIMATED_TIME |
+ // wxPD_REMAINING_TIME |
+ wxPD_CAN_ABORT );
+ mGimmick->AddFiles(storage,i_filenames);
+ mProgressDialog->Pulse(_T("Updating view..."));
+ UpdateTreeViewLevel(storage,1);
+ delete mProgressDialog;
+ DisplayAddSummary();
+ }
+ }
+
+
+
//========================================================================
void WxGimmickView::OnFieldsEdited(tree::Node* node, const std::string& name, const std::string& key, const std::string& val)
{