~ubuntu-branches/ubuntu/utopic/pgadmin3/utopic-proposed

« back to all changes in this revision

Viewing changes to pgadmin/ctl/explainShape.cpp

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2013-09-10 16:16:38 UTC
  • mfrom: (1.3.4)
  • Revision ID: package-import@ubuntu.com-20130910161638-wwup1q553ylww7dr
Tags: 1.18.0-1
* New upstream release.
* Don't install /usr/bin/png2c anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
//
3
3
// pgAdmin III - PostgreSQL Tools
4
4
//
5
 
// Copyright (C) 2002 - 2012, The pgAdmin Development Team
 
5
// Copyright (C) 2002 - 2013, The pgAdmin Development Team
6
6
// This software is released under the PostgreSQL Licence
7
7
//
8
8
// explainShape.cpp - Explain Shapes
71
71
        kidCount = 0;
72
72
        totalShapes = 0;
73
73
        usedShapes = 0;
 
74
        m_rootShape = false;
74
75
}
75
76
 
76
77
 
119
120
        if (!bmp.Ok())
120
121
                return;
121
122
 
 
123
        // We do not draw the root shape
 
124
        if (m_rootShape)
 
125
                return;
 
126
 
122
127
        int x, y;
123
128
        x = WXROUND(m_xpos - bmp.GetWidth() / 2.0);
124
129
        y = WXROUND(m_ypos - GetHeight() / 2.0);
180
185
        else
181
186
                descr = str;
182
187
 
 
188
        // Requested an empty shape, which can be treated as a root shape
 
189
        if (level == 0)
 
190
        {
 
191
                s = new ExplainShape(*ex_unknown_png_img, wxEmptyString);
 
192
                s->SetDraggable(false);
 
193
                s->m_rootShape = true;
 
194
                s->level = level;
 
195
                int w = 50, h = 20;
 
196
 
 
197
                wxBitmap &bmp = s->GetBitmap();
 
198
                if (w < bmp.GetWidth())
 
199
                        w = bmp.GetWidth();
 
200
 
 
201
                s->SetHeight(bmp.GetHeight() + BMP_BORDER + h);
 
202
                s->SetWidth(w);
 
203
 
 
204
                s->upperShape = NULL;
 
205
                s->kidNo = 0;
 
206
 
 
207
                return s;
 
208
        }
 
209
 
 
210
 
183
211
        // possible keywords can be found in postgresql/src/backend/commands/explain.c
184
212
 
185
213
        if (token == wxT("Total"))              return 0;